diff --git a/include/private/vulkan_private_extensions.h b/include/private/vulkan_private_extensions.h new file mode 100644 index 00000000..c148fa21 --- /dev/null +++ b/include/private/vulkan_private_extensions.h @@ -0,0 +1,35 @@ +#ifndef __VULKAN_PRIVATE_EXTENSIONS_H__ +#define __VULKAN_PRIVATE_EXTENSIONS_H__ + +/* Temporary kludge since these types are not public. */ + +#define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE ((VkStructureType)1000420000) +#define VK_STRUCTURE_TYPE_DESCRIPTOR_SET_BINDING_REFERENCE_VALVE ((VkStructureType)1000420001) +#define VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE ((VkStructureType)1000420002) + +#define VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_SPEC_VERSION 1 +#define VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME "VK_VALVE_descriptor_set_host_mapping" +typedef struct VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE { + VkStructureType sType; + void* pNext; + VkBool32 descriptorSetHostMapping; +} VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; + +typedef struct VkDescriptorSetBindingReferenceVALVE { + VkStructureType sType; + const void* pNext; + VkDescriptorSetLayout descriptorSetLayout; + uint32_t binding; +} VkDescriptorSetBindingReferenceVALVE; + +typedef struct VkDescriptorSetLayoutHostMappingInfoVALVE { + VkStructureType sType; + void* pNext; + size_t descriptorOffset; + uint32_t descriptorSize; +} VkDescriptorSetLayoutHostMappingInfoVALVE; + +typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE)(VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping); +typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetHostMappingVALVE)(VkDevice device, VkDescriptorSet descriptorSet, void** ppData); + +#endif diff --git a/include/vkd3d.h b/include/vkd3d.h index 3b81c509..34845eb6 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -31,6 +31,7 @@ # define VK_USE_PLATFORM_WIN32_KHR # endif # include +# include "private/vulkan_private_extensions.h" #endif /* VKD3D_NO_VULKAN_H */ #define VKD3D_MIN_API_VERSION VK_API_VERSION_1_1 diff --git a/include/vkd3d_win32.h b/include/vkd3d_win32.h index d9d0128d..9b58fa12 100644 --- a/include/vkd3d_win32.h +++ b/include/vkd3d_win32.h @@ -51,6 +51,7 @@ #define VK_USE_PLATFORM_WIN32_KHR #include +#include "private/vulkan_private_extensions.h" #ifdef __MINGW32__ # define static