summaryrefslogtreecommitdiff
path: root/src/renderer/backends/vulkan_helpers.h
blob: 058ea9179cf7f842bfa8d7bb9b674394d5037a18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <assert.h>
#include <vulkan/vulkan.h>

#include "darray.h"
#include "defines.h"

DECL_TYPED_ARRAY(const char*, cstr)

static void plat_get_required_extension_names(cstr_darray* extensions) {
#ifdef CEL_PLATFORM_LINUX
  cstr_darray_push(extensions, "VK_KHR_xcb_surface");
#endif
}

// TODO(omni): port to using internal assert functions
#define VK_CHECK(vulkan_expr) \
  { assert(vulkan_expr == VK_SUCCESS); }