Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Ryan Neph <ryanneph@google.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com>macos/master
parent
6e12fa67e6
commit
48be4bd55f
@ -0,0 +1,84 @@ |
||||
//
|
||||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014-2020 The Khronos Group Inc. |
||||
** |
||||
** SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
|
||||
|
||||
#ifndef VK_PLATFORM_H_ |
||||
#define VK_PLATFORM_H_ |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" |
||||
{ |
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
*************************************************************************************************** |
||||
* Platform-specific directives and type declarations |
||||
*************************************************************************************************** |
||||
*/ |
||||
|
||||
/* Platform-specific calling convention macros.
|
||||
* |
||||
* Platforms should define these so that Vulkan clients call Vulkan commands |
||||
* with the same calling conventions that the Vulkan implementation expects. |
||||
* |
||||
* VKAPI_ATTR - Placed before the return type in function declarations. |
||||
* Useful for C++11 and GCC/Clang-style function attribute syntax. |
||||
* VKAPI_CALL - Placed after the return type in function declarations. |
||||
* Useful for MSVC-style calling convention syntax. |
||||
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types. |
||||
* |
||||
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void); |
||||
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void); |
||||
*/ |
||||
#if defined(_WIN32) |
||||
// On Windows, Vulkan commands use the stdcall convention
|
||||
#define VKAPI_ATTR |
||||
#define VKAPI_CALL __stdcall |
||||
#define VKAPI_PTR VKAPI_CALL |
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7 |
||||
#error "Vulkan isn't supported for the 'armeabi' NDK ABI" |
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE) |
||||
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
||||
// calling convention, i.e. float parameters are passed in registers. This
|
||||
// is true even if the rest of the application passes floats on the stack,
|
||||
// as it does by default when compiling for the armeabi-v7a NDK ABI.
|
||||
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp"))) |
||||
#define VKAPI_CALL |
||||
#define VKAPI_PTR VKAPI_ATTR |
||||
#else |
||||
// On other platforms, use the default calling convention
|
||||
#define VKAPI_ATTR |
||||
#define VKAPI_CALL |
||||
#define VKAPI_PTR |
||||
#endif |
||||
|
||||
#if !defined(VK_NO_STDDEF_H) |
||||
#include <stddef.h> |
||||
#endif // !defined(VK_NO_STDDEF_H)
|
||||
|
||||
#if !defined(VK_NO_STDINT_H) |
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600) |
||||
typedef signed __int8 int8_t; |
||||
typedef unsigned __int8 uint8_t; |
||||
typedef signed __int16 int16_t; |
||||
typedef unsigned __int16 uint16_t; |
||||
typedef signed __int32 int32_t; |
||||
typedef unsigned __int32 uint32_t; |
||||
typedef signed __int64 int64_t; |
||||
typedef unsigned __int64 uint64_t; |
||||
#else |
||||
#include <stdint.h> |
||||
#endif |
||||
#endif // !defined(VK_NO_STDINT_H)
|
||||
|
||||
#ifdef __cplusplus |
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif |
@ -0,0 +1,27 @@ |
||||
/* This file is generated by venus-protocol git-2c678af3. */ |
||||
|
||||
/*
|
||||
* Copyright 2020 Google LLC |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#ifndef VN_PROTOCOL_RENDERER_H |
||||
#define VN_PROTOCOL_RENDERER_H |
||||
|
||||
#pragma GCC diagnostic push |
||||
|
||||
#pragma GCC diagnostic ignored "-Wpointer-arith" |
||||
#pragma GCC diagnostic ignored "-Wunused-parameter" |
||||
|
||||
#include "vn_protocol_renderer_cs.h" |
||||
#include "vn_protocol_renderer_defines.h" |
||||
#include "vn_protocol_renderer_info.h" |
||||
#include "vn_protocol_renderer_types.h" |
||||
#include "vn_protocol_renderer_handles.h" |
||||
#include "vn_protocol_renderer_structs.h" |
||||
#include "vn_protocol_renderer_commands.h" |
||||
#include "vn_protocol_renderer_dispatches.h" |
||||
|
||||
#pragma GCC diagnostic pop |
||||
|
||||
#endif /* VN_PROTOCOL_RENDERER_H */ |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,138 @@ |
||||
/* This file is generated by venus-protocol git-2c678af3. */ |
||||
|
||||
/*
|
||||
* Copyright 2020 Google LLC |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#ifndef VN_PROTOCOL_RENDERER_CS_H |
||||
#define VN_PROTOCOL_RENDERER_CS_H |
||||
|
||||
#include <assert.h> |
||||
|
||||
/*
|
||||
* These types/functions are expected |
||||
* |
||||
* struct vn_cs_encoder |
||||
* vn_cs_encoder_write |
||||
* |
||||
* struct vn_cs_decoder |
||||
* vn_cs_decoder_set_fatal |
||||
* vn_cs_decoder_get_fatal |
||||
* vn_cs_decoder_lookup_object |
||||
* vn_cs_decoder_reset_temp_pool |
||||
* vn_cs_decoder_alloc_temp |
||||
* vn_cs_decoder_read |
||||
* vn_cs_decoder_peek |
||||
* |
||||
* vn_object_id |
||||
* vn_cs_handle_indirect_id |
||||
* vn_cs_handle_load_id |
||||
* vn_cs_handle_store_id |
||||
* vn_cs_get_object_handle |
||||
*/ |
||||
#include "vkr_cs.h" |
||||
|
||||
struct vn_cs_encoder; |
||||
struct vn_cs_decoder; |
||||
|
||||
typedef vkr_object_id vn_object_id; |
||||
|
||||
static inline void |
||||
vn_cs_encoder_write(struct vn_cs_encoder *enc, size_t size, const void *val, size_t val_size) |
||||
{ |
||||
struct vkr_cs_encoder *e = (struct vkr_cs_encoder *)enc; |
||||
vkr_cs_encoder_write(e, size, val, val_size); |
||||
} |
||||
|
||||
static inline void |
||||
vn_cs_decoder_set_fatal(const struct vn_cs_decoder *dec) |
||||
{ |
||||
const struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; |
||||
vkr_cs_decoder_set_fatal(d); |
||||
} |
||||
|
||||
static inline bool |
||||
vn_cs_decoder_get_fatal(const struct vn_cs_decoder *dec) |
||||
{ |
||||
const struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; |
||||
return vkr_cs_decoder_get_fatal(d); |
||||
} |
||||
|
||||
static inline void * |
||||
vn_cs_decoder_lookup_object(const struct vn_cs_decoder *dec, vn_object_id id) |
||||
{ |
||||
const struct vkr_cs_decoder *d = (const struct vkr_cs_decoder *)dec; |
||||
return vkr_cs_decoder_lookup_object(d, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_cs_decoder_reset_temp_pool(struct vn_cs_decoder *dec) |
||||
{ |
||||
struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; |
||||
vkr_cs_decoder_reset_temp_pool(d); |
||||
} |
||||
|
||||
static inline void * |
||||
vn_cs_decoder_alloc_temp(struct vn_cs_decoder *dec, size_t size) |
||||
{ |
||||
struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; |
||||
return vkr_cs_decoder_alloc_temp(d, size); |
||||
} |
||||
|
||||
static inline void |
||||
vn_cs_decoder_read(struct vn_cs_decoder *dec, size_t size, void *val, size_t val_size) |
||||
{ |
||||
struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; |
||||
vkr_cs_decoder_read(d, size, val, val_size); |
||||
} |
||||
|
||||
static inline void |
||||
vn_cs_decoder_peek(const struct vn_cs_decoder *dec, size_t size, void *val, size_t val_size) |
||||
{ |
||||
const struct vkr_cs_decoder *d = (const struct vkr_cs_decoder *)dec; |
||||
vkr_cs_decoder_peek(d, size, val, val_size); |
||||
} |
||||
|
||||
static inline bool |
||||
vn_cs_handle_indirect_id(VkObjectType type) |
||||
{ |
||||
return vkr_cs_handle_indirect_id(type); |
||||
} |
||||
|
||||
static inline vn_object_id |
||||
vn_cs_handle_load_id(const void **handle, VkObjectType type) |
||||
{ |
||||
return vkr_cs_handle_load_id(handle, type); |
||||
} |
||||
|
||||
static inline void |
||||
vn_cs_handle_store_id(void **handle, vn_object_id id, VkObjectType type) |
||||
{ |
||||
vkr_cs_handle_store_id(handle, id, type); |
||||
} |
||||
|
||||
static inline uint64_t |
||||
vn_cs_get_object_handle(const void **handle, VkObjectType type) |
||||
{ |
||||
const struct vkr_object *obj = *(const struct vkr_object **)handle; |
||||
return obj ? obj->handle.u64 : 0; |
||||
} |
||||
|
||||
static inline void |
||||
vn_encode(struct vn_cs_encoder *enc, size_t size, const void *data, size_t data_size) |
||||
{ |
||||
assert(size % 4 == 0); |
||||
/* no vn_cs_encoder_reserve; vn_cs_encoder_write must do size check */ |
||||
/* TODO check if the generated code is optimal */ |
||||
vn_cs_encoder_write(enc, size, data, data_size); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode(struct vn_cs_decoder *dec, size_t size, void *data, size_t data_size) |
||||
{ |
||||
assert(size % 4 == 0); |
||||
vn_cs_decoder_read(dec, size, data, data_size); |
||||
} |
||||
|
||||
#endif /* VN_PROTOCOL_RENDERER_CS_H */ |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,875 @@ |
||||
/* This file is generated by venus-protocol git-2c678af3. */ |
||||
|
||||
/*
|
||||
* Copyright 2020 Google LLC |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#ifndef VN_PROTOCOL_RENDERER_HANDLES_H |
||||
#define VN_PROTOCOL_RENDERER_HANDLES_H |
||||
|
||||
#include "vn_protocol_renderer_types.h" |
||||
|
||||
/* VK_DEFINE_HANDLE(VkInstance) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkInstance(struct vn_cs_encoder *enc, const VkInstance *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_INSTANCE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkInstance_temp(struct vn_cs_decoder *dec, VkInstance *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_INSTANCE)) { |
||||
*val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); |
||||
if (!val) |
||||
return; |
||||
} |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_INSTANCE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkInstance_lookup(struct vn_cs_decoder *dec, VkInstance *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkInstance)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkInstance_handle(VkInstance *val) |
||||
{ |
||||
*val = (VkInstance)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_INSTANCE); |
||||
} |
||||
|
||||
/* VK_DEFINE_HANDLE(VkPhysicalDevice) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkPhysicalDevice(struct vn_cs_encoder *enc, const VkPhysicalDevice *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PHYSICAL_DEVICE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkPhysicalDevice_temp(struct vn_cs_decoder *dec, VkPhysicalDevice *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_PHYSICAL_DEVICE)) { |
||||
*val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); |
||||
if (!val) |
||||
return; |
||||
} |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PHYSICAL_DEVICE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkPhysicalDevice_lookup(struct vn_cs_decoder *dec, VkPhysicalDevice *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkPhysicalDevice)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkPhysicalDevice_handle(VkPhysicalDevice *val) |
||||
{ |
||||
*val = (VkPhysicalDevice)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_PHYSICAL_DEVICE); |
||||
} |
||||
|
||||
/* VK_DEFINE_HANDLE(VkDevice) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkDevice(struct vn_cs_encoder *enc, const VkDevice *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DEVICE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDevice_temp(struct vn_cs_decoder *dec, VkDevice *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_DEVICE)) { |
||||
*val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); |
||||
if (!val) |
||||
return; |
||||
} |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DEVICE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDevice_lookup(struct vn_cs_decoder *dec, VkDevice *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkDevice)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkDevice_handle(VkDevice *val) |
||||
{ |
||||
*val = (VkDevice)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DEVICE); |
||||
} |
||||
|
||||
/* VK_DEFINE_HANDLE(VkQueue) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkQueue(struct vn_cs_encoder *enc, const VkQueue *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_QUEUE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkQueue_temp(struct vn_cs_decoder *dec, VkQueue *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_QUEUE)) { |
||||
*val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); |
||||
if (!val) |
||||
return; |
||||
} |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_QUEUE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkQueue_lookup(struct vn_cs_decoder *dec, VkQueue *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkQueue)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkQueue_handle(VkQueue *val) |
||||
{ |
||||
*val = (VkQueue)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_QUEUE); |
||||
} |
||||
|
||||
/* VK_DEFINE_HANDLE(VkCommandBuffer) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkCommandBuffer(struct vn_cs_encoder *enc, const VkCommandBuffer *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_COMMAND_BUFFER); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkCommandBuffer_temp(struct vn_cs_decoder *dec, VkCommandBuffer *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_COMMAND_BUFFER)) { |
||||
*val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); |
||||
if (!val) |
||||
return; |
||||
} |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_COMMAND_BUFFER); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkCommandBuffer_lookup(struct vn_cs_decoder *dec, VkCommandBuffer *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkCommandBuffer)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkCommandBuffer_handle(VkCommandBuffer *val) |
||||
{ |
||||
*val = (VkCommandBuffer)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_COMMAND_BUFFER); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkDeviceMemory(struct vn_cs_encoder *enc, const VkDeviceMemory *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DEVICE_MEMORY); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDeviceMemory(struct vn_cs_decoder *dec, VkDeviceMemory *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DEVICE_MEMORY); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDeviceMemory_lookup(struct vn_cs_decoder *dec, VkDeviceMemory *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkDeviceMemory)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkDeviceMemory_handle(VkDeviceMemory *val) |
||||
{ |
||||
*val = (VkDeviceMemory)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DEVICE_MEMORY); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkCommandPool(struct vn_cs_encoder *enc, const VkCommandPool *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_COMMAND_POOL); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkCommandPool(struct vn_cs_decoder *dec, VkCommandPool *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_COMMAND_POOL); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkCommandPool_lookup(struct vn_cs_decoder *dec, VkCommandPool *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkCommandPool)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkCommandPool_handle(VkCommandPool *val) |
||||
{ |
||||
*val = (VkCommandPool)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_COMMAND_POOL); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkBuffer(struct vn_cs_encoder *enc, const VkBuffer *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_BUFFER); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkBuffer(struct vn_cs_decoder *dec, VkBuffer *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_BUFFER); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkBuffer_lookup(struct vn_cs_decoder *dec, VkBuffer *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkBuffer)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkBuffer_handle(VkBuffer *val) |
||||
{ |
||||
*val = (VkBuffer)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_BUFFER); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkBufferView(struct vn_cs_encoder *enc, const VkBufferView *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_BUFFER_VIEW); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkBufferView(struct vn_cs_decoder *dec, VkBufferView *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_BUFFER_VIEW); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkBufferView_lookup(struct vn_cs_decoder *dec, VkBufferView *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkBufferView)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkBufferView_handle(VkBufferView *val) |
||||
{ |
||||
*val = (VkBufferView)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_BUFFER_VIEW); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkImage(struct vn_cs_encoder *enc, const VkImage *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_IMAGE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkImage(struct vn_cs_decoder *dec, VkImage *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_IMAGE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkImage_lookup(struct vn_cs_decoder *dec, VkImage *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkImage)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkImage_handle(VkImage *val) |
||||
{ |
||||
*val = (VkImage)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_IMAGE); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkImageView(struct vn_cs_encoder *enc, const VkImageView *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_IMAGE_VIEW); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkImageView(struct vn_cs_decoder *dec, VkImageView *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_IMAGE_VIEW); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkImageView_lookup(struct vn_cs_decoder *dec, VkImageView *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkImageView)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkImageView_handle(VkImageView *val) |
||||
{ |
||||
*val = (VkImageView)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_IMAGE_VIEW); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkShaderModule(struct vn_cs_encoder *enc, const VkShaderModule *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SHADER_MODULE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkShaderModule(struct vn_cs_decoder *dec, VkShaderModule *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SHADER_MODULE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkShaderModule_lookup(struct vn_cs_decoder *dec, VkShaderModule *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkShaderModule)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkShaderModule_handle(VkShaderModule *val) |
||||
{ |
||||
*val = (VkShaderModule)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_SHADER_MODULE); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkPipeline(struct vn_cs_encoder *enc, const VkPipeline *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PIPELINE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkPipeline(struct vn_cs_decoder *dec, VkPipeline *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PIPELINE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkPipeline_lookup(struct vn_cs_decoder *dec, VkPipeline *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkPipeline)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkPipeline_handle(VkPipeline *val) |
||||
{ |
||||
*val = (VkPipeline)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_PIPELINE); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkPipelineLayout(struct vn_cs_encoder *enc, const VkPipelineLayout *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PIPELINE_LAYOUT); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkPipelineLayout(struct vn_cs_decoder *dec, VkPipelineLayout *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PIPELINE_LAYOUT); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkPipelineLayout_lookup(struct vn_cs_decoder *dec, VkPipelineLayout *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkPipelineLayout)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkPipelineLayout_handle(VkPipelineLayout *val) |
||||
{ |
||||
*val = (VkPipelineLayout)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_PIPELINE_LAYOUT); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkSampler(struct vn_cs_encoder *enc, const VkSampler *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SAMPLER); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkSampler(struct vn_cs_decoder *dec, VkSampler *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SAMPLER); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkSampler_lookup(struct vn_cs_decoder *dec, VkSampler *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkSampler)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkSampler_handle(VkSampler *val) |
||||
{ |
||||
*val = (VkSampler)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_SAMPLER); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkDescriptorSet(struct vn_cs_encoder *enc, const VkDescriptorSet *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDescriptorSet(struct vn_cs_decoder *dec, VkDescriptorSet *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_SET); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDescriptorSet_lookup(struct vn_cs_decoder *dec, VkDescriptorSet *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkDescriptorSet)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkDescriptorSet_handle(VkDescriptorSet *val) |
||||
{ |
||||
*val = (VkDescriptorSet)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkDescriptorSetLayout(struct vn_cs_encoder *enc, const VkDescriptorSetLayout *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDescriptorSetLayout(struct vn_cs_decoder *dec, VkDescriptorSetLayout *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDescriptorSetLayout_lookup(struct vn_cs_decoder *dec, VkDescriptorSetLayout *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkDescriptorSetLayout)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkDescriptorSetLayout_handle(VkDescriptorSetLayout *val) |
||||
{ |
||||
*val = (VkDescriptorSetLayout)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkDescriptorPool(struct vn_cs_encoder *enc, const VkDescriptorPool *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_POOL); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDescriptorPool(struct vn_cs_decoder *dec, VkDescriptorPool *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_POOL); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDescriptorPool_lookup(struct vn_cs_decoder *dec, VkDescriptorPool *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkDescriptorPool)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkDescriptorPool_handle(VkDescriptorPool *val) |
||||
{ |
||||
*val = (VkDescriptorPool)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_POOL); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkFence(struct vn_cs_encoder *enc, const VkFence *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_FENCE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkFence(struct vn_cs_decoder *dec, VkFence *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_FENCE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkFence_lookup(struct vn_cs_decoder *dec, VkFence *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkFence)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkFence_handle(VkFence *val) |
||||
{ |
||||
*val = (VkFence)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_FENCE); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkSemaphore(struct vn_cs_encoder *enc, const VkSemaphore *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SEMAPHORE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkSemaphore(struct vn_cs_decoder *dec, VkSemaphore *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SEMAPHORE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkSemaphore_lookup(struct vn_cs_decoder *dec, VkSemaphore *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkSemaphore)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkSemaphore_handle(VkSemaphore *val) |
||||
{ |
||||
*val = (VkSemaphore)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_SEMAPHORE); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkEvent(struct vn_cs_encoder *enc, const VkEvent *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_EVENT); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkEvent(struct vn_cs_decoder *dec, VkEvent *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_EVENT); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkEvent_lookup(struct vn_cs_decoder *dec, VkEvent *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkEvent)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkEvent_handle(VkEvent *val) |
||||
{ |
||||
*val = (VkEvent)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_EVENT); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkQueryPool(struct vn_cs_encoder *enc, const VkQueryPool *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_QUERY_POOL); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkQueryPool(struct vn_cs_decoder *dec, VkQueryPool *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_QUERY_POOL); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkQueryPool_lookup(struct vn_cs_decoder *dec, VkQueryPool *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkQueryPool)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkQueryPool_handle(VkQueryPool *val) |
||||
{ |
||||
*val = (VkQueryPool)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_QUERY_POOL); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkFramebuffer(struct vn_cs_encoder *enc, const VkFramebuffer *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_FRAMEBUFFER); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkFramebuffer(struct vn_cs_decoder *dec, VkFramebuffer *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_FRAMEBUFFER); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkFramebuffer_lookup(struct vn_cs_decoder *dec, VkFramebuffer *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkFramebuffer)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkFramebuffer_handle(VkFramebuffer *val) |
||||
{ |
||||
*val = (VkFramebuffer)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_FRAMEBUFFER); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkRenderPass(struct vn_cs_encoder *enc, const VkRenderPass *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_RENDER_PASS); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkRenderPass(struct vn_cs_decoder *dec, VkRenderPass *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_RENDER_PASS); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkRenderPass_lookup(struct vn_cs_decoder *dec, VkRenderPass *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkRenderPass)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkRenderPass_handle(VkRenderPass *val) |
||||
{ |
||||
*val = (VkRenderPass)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_RENDER_PASS); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkPipelineCache(struct vn_cs_encoder *enc, const VkPipelineCache *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PIPELINE_CACHE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkPipelineCache(struct vn_cs_decoder *dec, VkPipelineCache *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PIPELINE_CACHE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkPipelineCache_lookup(struct vn_cs_decoder *dec, VkPipelineCache *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkPipelineCache)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkPipelineCache_handle(VkPipelineCache *val) |
||||
{ |
||||
*val = (VkPipelineCache)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_PIPELINE_CACHE); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkDescriptorUpdateTemplate(struct vn_cs_encoder *enc, const VkDescriptorUpdateTemplate *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDescriptorUpdateTemplate(struct vn_cs_decoder *dec, VkDescriptorUpdateTemplate *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkDescriptorUpdateTemplate_lookup(struct vn_cs_decoder *dec, VkDescriptorUpdateTemplate *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkDescriptorUpdateTemplate)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkDescriptorUpdateTemplate_handle(VkDescriptorUpdateTemplate *val) |
||||
{ |
||||
*val = (VkDescriptorUpdateTemplate)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); |
||||
} |
||||
|
||||
/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) */ |
||||
|
||||
static inline void |
||||
vn_encode_VkSamplerYcbcrConversion(struct vn_cs_encoder *enc, const VkSamplerYcbcrConversion *val) |
||||
{ |
||||
const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); |
||||
vn_encode_uint64_t(enc, &id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkSamplerYcbcrConversion(struct vn_cs_decoder *dec, VkSamplerYcbcrConversion *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); |
||||
} |
||||
|
||||
static inline void |
||||
vn_decode_VkSamplerYcbcrConversion_lookup(struct vn_cs_decoder *dec, VkSamplerYcbcrConversion *val) |
||||
{ |
||||
uint64_t id; |
||||
vn_decode_uint64_t(dec, &id); |
||||
*val = (VkSamplerYcbcrConversion)(uintptr_t)vn_cs_decoder_lookup_object(dec, id); |
||||
} |
||||
|
||||
static inline void |
||||
vn_replace_VkSamplerYcbcrConversion_handle(VkSamplerYcbcrConversion *val) |
||||
{ |
||||
*val = (VkSamplerYcbcrConversion)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); |
||||
} |
||||
|
||||
#endif /* VN_PROTOCOL_RENDERER_HANDLES_H */ |
@ -0,0 +1,149 @@ |
||||
/* This file is generated by venus-protocol git-2c678af3. */ |
||||
|
||||
/*
|
||||
* Copyright 2020 Google LLC |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#ifndef VN_PROTOCOL_RENDERER_INFO_H |
||||
#define VN_PROTOCOL_RENDERER_INFO_H |
||||
|
||||
#include "vn_protocol_renderer_defines.h" |
||||
|
||||
static inline uint32_t |
||||
vn_info_wire_format_version(void) |
||||
{ |
||||
return 0; |
||||
} |
||||
|
||||
static inline uint32_t |
||||
vn_info_vk_xml_version(void) |
||||
{ |
||||
return VK_MAKE_VERSION(1, 2, 168); |
||||
} |
||||
|
||||
static inline int |
||||
vn_info_extension_compare(const void *a, const void *b) |
||||
{ |
||||
return strcmp(a, *(const char **)b); |
||||
} |
||||
|
||||
static inline uint32_t |
||||
vn_info_extension_spec_version(const char *name) |
||||
{ |
||||
static uint32_t ext_count = 51; |
||||
static const char *ext_names[51] = { |
||||
"VK_EXT_command_serialization", |
||||
"VK_EXT_descriptor_indexing", |
||||
"VK_EXT_host_query_reset", |
||||
"VK_EXT_image_drm_format_modifier", |
||||
"VK_EXT_sampler_filter_minmax", |
||||
"VK_EXT_scalar_block_layout", |
||||
"VK_EXT_separate_stencil_usage", |
||||
"VK_EXT_shader_viewport_index_layer", |
||||
"VK_EXT_transform_feedback", |
||||
"VK_KHR_16bit_storage", |
||||
"VK_KHR_8bit_storage", |
||||
"VK_KHR_bind_memory2", |
||||
"VK_KHR_buffer_device_address", |
||||
"VK_KHR_create_renderpass2", |
||||
"VK_KHR_dedicated_allocation", |
||||
"VK_KHR_depth_stencil_resolve", |
||||
"VK_KHR_descriptor_update_template", |
||||
"VK_KHR_device_group", |
||||
"VK_KHR_device_group_creation", |
||||
"VK_KHR_draw_indirect_count", |
||||
"VK_KHR_driver_properties", |
||||
"VK_KHR_external_fence", |
||||
"VK_KHR_external_fence_capabilities", |
||||
"VK_KHR_external_memory", |
||||
"VK_KHR_external_memory_capabilities", |
||||
"VK_KHR_external_semaphore", |
||||
"VK_KHR_external_semaphore_capabilities", |
||||
"VK_KHR_get_memory_requirements2", |
||||
"VK_KHR_get_physical_device_properties2", |
||||
"VK_KHR_image_format_list", |
||||
"VK_KHR_imageless_framebuffer", |
||||
"VK_KHR_maintenance1", |
||||
"VK_KHR_maintenance2", |
||||
"VK_KHR_maintenance3", |
||||
"VK_KHR_multiview", |
||||
"VK_KHR_relaxed_block_layout", |
||||
"VK_KHR_sampler_mirror_clamp_to_edge", |
||||
"VK_KHR_sampler_ycbcr_conversion", |
||||
"VK_KHR_separate_depth_stencil_layouts", |
||||
"VK_KHR_shader_atomic_int64", |
||||
"VK_KHR_shader_draw_parameters", |
||||
"VK_KHR_shader_float16_int8", |
||||
"VK_KHR_shader_float_controls", |
||||
"VK_KHR_shader_subgroup_extended_types", |
||||
"VK_KHR_spirv_1_4", |
||||
"VK_KHR_storage_buffer_storage_class", |
||||
"VK_KHR_timeline_semaphore", |
||||
"VK_KHR_uniform_buffer_standard_layout", |
||||
"VK_KHR_variable_pointers", |
||||
"VK_KHR_vulkan_memory_model", |
||||
"VK_MESA_venus_protocol", |
||||
}; |
||||
static const uint32_t ext_versions[51] = { |
||||
0, |
||||
2, |
||||
1, |
||||
1, |
||||
2, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
3, |
||||
1, |
||||
1, |
||||
4, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
2, |
||||
1, |
||||
1, |
||||
2, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
3, |
||||
14, |
||||
1, |
||||
1, |
||||
1, |
||||
1, |
||||
4, |
||||
1, |
||||
1, |
||||
1, |
||||
2, |
||||
1, |
||||
1, |
||||
3, |
||||
0, |
||||
}; |
||||
const char **found; |
||||
|
||||
found = bsearch(name, ext_names, ext_count, sizeof(ext_names[0]), |
||||
vn_info_extension_compare); |
||||
|
||||
return found ? ext_versions[found - ext_names] : 0; |
||||
} |
||||
|
||||
#endif /* VN_PROTOCOL_RENDERER_INFO_H */ |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,87 @@ |
||||
#ifndef VULKAN_H_ |
||||
#define VULKAN_H_ 1 |
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc. |
||||
** |
||||
** SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
|
||||
#include "vk_platform.h" |
||||
#include "vulkan_core.h" |
||||
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR |
||||
#include "vulkan_android.h" |
||||
#endif |
||||
|
||||
#ifdef VK_USE_PLATFORM_FUCHSIA |
||||
#include <zircon/types.h> |
||||
#include "vulkan_fuchsia.h" |
||||
#endif |
||||
|
||||
#ifdef VK_USE_PLATFORM_IOS_MVK |
||||
#include "vulkan_ios.h" |
||||
#endif |
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MACOS_MVK |
||||
#include "vulkan_macos.h" |
||||
#endif |
||||
|
||||
#ifdef VK_USE_PLATFORM_METAL_EXT |
||||
#include "vulkan_metal.h" |
||||
#endif |
||||
|
||||
#ifdef VK_USE_PLATFORM_VI_NN |
||||
#include "vulkan_vi.h" |
||||
#endif |
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR |
||||
#include <wayland-client.h> |
||||
#include "vulkan_wayland.h" |
||||
#endif |
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR |
||||
#include <windows.h> |
||||
#include "vulkan_win32.h" |
||||
#endif |
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR |
||||
#include <xcb/xcb.h> |
||||
#include "vulkan_xcb.h" |
||||
#endif |
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR |
||||
#include <X11/Xlib.h> |
||||
#include "vulkan_xlib.h" |
||||
#endif |
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_DIRECTFB_EXT |
||||
#include <directfb.h> |
||||
#include "vulkan_directfb.h" |
||||
#endif |
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT |
||||
#include <X11/Xlib.h> |
||||
#include <X11/extensions/Xrandr.h> |
||||
#include "vulkan_xlib_xrandr.h" |
||||
#endif |
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_GGP |
||||
#include <ggp_c/vulkan_types.h> |
||||
#include "vulkan_ggp.h" |
||||
#endif |
||||
|
||||
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS |
||||
#include "vulkan_beta.h" |
||||
#endif |
||||
|
||||
#endif // VULKAN_H_
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue