mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-26 07:35:37 +00:00
Update to vulkan headers 1.1.129
* Expand handling for EXT_buffer_device_address to cover KHR_buffer_device_address
This commit is contained in:
@@ -44,7 +44,7 @@ extern "C" {
|
||||
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
|
||||
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
|
||||
// Version of this file
|
||||
#define VK_HEADER_VERSION 128
|
||||
#define VK_HEADER_VERSION 129
|
||||
|
||||
|
||||
#define VK_NULL_HANDLE 0
|
||||
@@ -145,10 +145,11 @@ typedef enum VkResult {
|
||||
VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = -1000158000,
|
||||
VK_ERROR_FRAGMENTATION_EXT = -1000161000,
|
||||
VK_ERROR_NOT_PERMITTED_EXT = -1000174001,
|
||||
VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = -1000244000,
|
||||
VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = -1000255000,
|
||||
VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = -1000244000,
|
||||
VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY,
|
||||
VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE,
|
||||
VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR,
|
||||
VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL,
|
||||
VK_RESULT_END_RANGE = VK_INCOMPLETE,
|
||||
VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1),
|
||||
@@ -516,7 +517,6 @@ typedef enum VkStructureType {
|
||||
VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = 1000241001,
|
||||
VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = 1000241002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000,
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = 1000244001,
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002,
|
||||
VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = 1000246000,
|
||||
VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000,
|
||||
@@ -533,6 +533,11 @@ typedef enum VkStructureType {
|
||||
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002,
|
||||
VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001,
|
||||
VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR = 1000257000,
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR = 1000244001,
|
||||
VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = 1000257002,
|
||||
VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = 1000257003,
|
||||
VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = 1000257004,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = 1000259000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = 1000259001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002,
|
||||
@@ -613,6 +618,7 @@ typedef enum VkStructureType {
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES,
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT,
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR,
|
||||
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
|
||||
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
|
||||
@@ -1657,7 +1663,8 @@ typedef enum VkBufferCreateFlagBits {
|
||||
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
|
||||
VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
|
||||
VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008,
|
||||
VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 0x00000010,
|
||||
VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 0x00000010,
|
||||
VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR,
|
||||
VK_BUFFER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkBufferCreateFlagBits;
|
||||
typedef VkFlags VkBufferCreateFlags;
|
||||
@@ -1676,7 +1683,8 @@ typedef enum VkBufferUsageFlagBits {
|
||||
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000,
|
||||
VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200,
|
||||
VK_BUFFER_USAGE_RAY_TRACING_BIT_NV = 0x00000400,
|
||||
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT = 0x00020000,
|
||||
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR = 0x00020000,
|
||||
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR,
|
||||
VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkBufferUsageFlagBits;
|
||||
typedef VkFlags VkBufferUsageFlags;
|
||||
@@ -4060,6 +4068,8 @@ typedef VkFlags VkPeerMemoryFeatureFlags;
|
||||
|
||||
typedef enum VkMemoryAllocateFlagBits {
|
||||
VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001,
|
||||
VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR = 0x00000002,
|
||||
VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 0x00000004,
|
||||
VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT,
|
||||
VK_MEMORY_ALLOCATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkMemoryAllocateFlagBits;
|
||||
@@ -6680,6 +6690,61 @@ typedef struct VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR {
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_buffer_device_address 1
|
||||
typedef uint64_t VkDeviceAddress;
|
||||
#define VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 1
|
||||
#define VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_KHR_buffer_device_address"
|
||||
typedef struct VkPhysicalDeviceBufferDeviceAddressFeaturesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 bufferDeviceAddress;
|
||||
VkBool32 bufferDeviceAddressCaptureReplay;
|
||||
VkBool32 bufferDeviceAddressMultiDevice;
|
||||
} VkPhysicalDeviceBufferDeviceAddressFeaturesKHR;
|
||||
|
||||
typedef struct VkBufferDeviceAddressInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkBuffer buffer;
|
||||
} VkBufferDeviceAddressInfoKHR;
|
||||
|
||||
typedef struct VkBufferOpaqueCaptureAddressCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint64_t opaqueCaptureAddress;
|
||||
} VkBufferOpaqueCaptureAddressCreateInfoKHR;
|
||||
|
||||
typedef struct VkMemoryOpaqueCaptureAddressAllocateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint64_t opaqueCaptureAddress;
|
||||
} VkMemoryOpaqueCaptureAddressAllocateInfoKHR;
|
||||
|
||||
typedef struct VkDeviceMemoryOpaqueCaptureAddressInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
} VkDeviceMemoryOpaqueCaptureAddressInfoKHR;
|
||||
|
||||
typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetBufferDeviceAddressKHR)(VkDevice device, const VkBufferDeviceAddressInfoKHR* pInfo);
|
||||
typedef uint64_t (VKAPI_PTR *PFN_vkGetBufferOpaqueCaptureAddressKHR)(VkDevice device, const VkBufferDeviceAddressInfoKHR* pInfo);
|
||||
typedef uint64_t (VKAPI_PTR *PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfoKHR* pInfo);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddressKHR(
|
||||
VkDevice device,
|
||||
const VkBufferDeviceAddressInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR uint64_t VKAPI_CALL vkGetBufferOpaqueCaptureAddressKHR(
|
||||
VkDevice device,
|
||||
const VkBufferDeviceAddressInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR uint64_t VKAPI_CALL vkGetDeviceMemoryOpaqueCaptureAddressKHR(
|
||||
VkDevice device,
|
||||
const VkDeviceMemoryOpaqueCaptureAddressInfoKHR* pInfo);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_pipeline_executable_properties 1
|
||||
#define VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION 1
|
||||
#define VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME "VK_KHR_pipeline_executable_properties"
|
||||
@@ -9811,7 +9876,6 @@ typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV {
|
||||
|
||||
|
||||
#define VK_EXT_buffer_device_address 1
|
||||
typedef uint64_t VkDeviceAddress;
|
||||
#define VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 2
|
||||
#define VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_EXT_buffer_device_address"
|
||||
typedef struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT {
|
||||
@@ -9824,11 +9888,7 @@ typedef struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT {
|
||||
|
||||
typedef VkPhysicalDeviceBufferDeviceAddressFeaturesEXT VkPhysicalDeviceBufferAddressFeaturesEXT;
|
||||
|
||||
typedef struct VkBufferDeviceAddressInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkBuffer buffer;
|
||||
} VkBufferDeviceAddressInfoEXT;
|
||||
typedef VkBufferDeviceAddressInfoKHR VkBufferDeviceAddressInfoEXT;
|
||||
|
||||
typedef struct VkBufferDeviceAddressCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
@@ -9836,12 +9896,12 @@ typedef struct VkBufferDeviceAddressCreateInfoEXT {
|
||||
VkDeviceAddress deviceAddress;
|
||||
} VkBufferDeviceAddressCreateInfoEXT;
|
||||
|
||||
typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetBufferDeviceAddressEXT)(VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo);
|
||||
typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetBufferDeviceAddressEXT)(VkDevice device, const VkBufferDeviceAddressInfoKHR* pInfo);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddressEXT(
|
||||
VkDevice device,
|
||||
const VkBufferDeviceAddressInfoEXT* pInfo);
|
||||
const VkBufferDeviceAddressInfoKHR* pInfo);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ server.
|
||||
<type category="define">// Vulkan 1.1 version number
|
||||
#define <name>VK_API_VERSION_1_1</name> <type>VK_MAKE_VERSION</type>(1, 1, 0)// Patch version should always be set to 0</type>
|
||||
<type category="define">// Version of this file
|
||||
#define <name>VK_HEADER_VERSION</name> 128</type>
|
||||
#define <name>VK_HEADER_VERSION</name> 129</type>
|
||||
|
||||
<type category="define">
|
||||
#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type>
|
||||
@@ -3865,6 +3865,13 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<member>const <type>void</type>* <name>pNext</name></member>
|
||||
<member><type>float</type> <name>priority</name></member>
|
||||
</type>
|
||||
<type category="struct" name="VkPhysicalDeviceBufferDeviceAddressFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
|
||||
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
|
||||
<member><type>VkBool32</type> <name>bufferDeviceAddress</name></member>
|
||||
<member><type>VkBool32</type> <name>bufferDeviceAddressCaptureReplay</name></member>
|
||||
<member><type>VkBool32</type> <name>bufferDeviceAddressMultiDevice</name></member>
|
||||
</type>
|
||||
<type category="struct" name="VkPhysicalDeviceBufferDeviceAddressFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
|
||||
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
|
||||
@@ -3872,12 +3879,18 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<member><type>VkBool32</type> <name>bufferDeviceAddressCaptureReplay</name></member>
|
||||
<member><type>VkBool32</type> <name>bufferDeviceAddressMultiDevice</name></member>
|
||||
</type>
|
||||
<type category="struct" name="VkPhysicalDeviceBufferAddressFeaturesEXT" alias="VkPhysicalDeviceBufferDeviceAddressFeaturesEXT"/>
|
||||
<type category="struct" name="VkBufferDeviceAddressInfoEXT">
|
||||
<member values="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<type category="struct" name="VkPhysicalDeviceBufferAddressFeaturesEXT" alias="VkPhysicalDeviceBufferDeviceAddressFeaturesEXT"/>
|
||||
<type category="struct" name="VkBufferDeviceAddressInfoKHR">
|
||||
<member values="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<member>const <type>void</type>* <name>pNext</name></member>
|
||||
<member><type>VkBuffer</type> <name>buffer</name></member>
|
||||
</type>
|
||||
<type category="struct" name="VkBufferDeviceAddressInfoEXT" alias="VkBufferDeviceAddressInfoKHR"/>
|
||||
<type category="struct" name="VkBufferOpaqueCaptureAddressCreateInfoKHR" structextends="VkBufferCreateInfo">
|
||||
<member values="VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<member>const <type>void</type>* <name>pNext</name></member>
|
||||
<member><type>uint64_t</type> <name>opaqueCaptureAddress</name></member>
|
||||
</type>
|
||||
<type category="struct" name="VkBufferDeviceAddressCreateInfoEXT" structextends="VkBufferCreateInfo">
|
||||
<member values="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<member>const <type>void</type>* <name>pNext</name></member>
|
||||
@@ -4246,6 +4259,16 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<member><type>void</type>* <name>pNext</name></member>
|
||||
<member><type>uint32_t</type> <name>requiredSubgroupSize</name></member>
|
||||
</type>
|
||||
<type category="struct" name="VkMemoryOpaqueCaptureAddressAllocateInfoKHR" structextends="VkMemoryAllocateInfo">
|
||||
<member values="VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<member>const <type>void</type>* <name>pNext</name></member>
|
||||
<member><type>uint64_t</type> <name>opaqueCaptureAddress</name></member>
|
||||
</type>
|
||||
<type category="struct" name="VkDeviceMemoryOpaqueCaptureAddressInfoKHR">
|
||||
<member values="VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<member>const <type>void</type>* <name>pNext</name></member>
|
||||
<member><type>VkDeviceMemory</type> <name>memory</name></member>
|
||||
</type>
|
||||
<type category="struct" name="VkPhysicalDeviceLineRasterizationFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
|
||||
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
|
||||
@@ -5740,7 +5763,7 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<param>all sname:VkQueue objects created from pname:device</param>
|
||||
</implicitexternsyncparams>
|
||||
</command>
|
||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_INVALID_EXTERNAL_HANDLE">
|
||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_INVALID_EXTERNAL_HANDLE,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR">
|
||||
<proto><type>VkResult</type> <name>vkAllocateMemory</name></proto>
|
||||
<param><type>VkDevice</type> <name>device</name></param>
|
||||
<param>const <type>VkMemoryAllocateInfo</type>* <name>pAllocateInfo</name></param>
|
||||
@@ -5791,7 +5814,7 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<param><type>VkBuffer</type> <name>buffer</name></param>
|
||||
<param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param>
|
||||
</command>
|
||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
|
||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR">
|
||||
<proto><type>VkResult</type> <name>vkBindBufferMemory</name></proto>
|
||||
<param><type>VkDevice</type> <name>device</name></param>
|
||||
<param externsync="true"><type>VkBuffer</type> <name>buffer</name></param>
|
||||
@@ -5940,7 +5963,7 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<param><type>uint32_t</type> <name>firstQuery</name></param>
|
||||
<param><type>uint32_t</type> <name>queryCount</name></param>
|
||||
</command>
|
||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_DEVICE_ADDRESS_EXT">
|
||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR">
|
||||
<proto><type>VkResult</type> <name>vkCreateBuffer</name></proto>
|
||||
<param><type>VkDevice</type> <name>device</name></param>
|
||||
<param>const <type>VkBufferCreateInfo</type>* <name>pCreateInfo</name></param>
|
||||
@@ -7127,7 +7150,7 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<param><type>VkPeerMemoryFeatureFlags</type>* <name>pPeerMemoryFeatures</name></param>
|
||||
</command>
|
||||
<command name="vkGetDeviceGroupPeerMemoryFeaturesKHR" alias="vkGetDeviceGroupPeerMemoryFeatures"/>
|
||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
|
||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR">
|
||||
<proto><type>VkResult</type> <name>vkBindBufferMemory2</name></proto>
|
||||
<param><type>VkDevice</type> <name>device</name></param>
|
||||
<param><type>uint32_t</type> <name>bindInfoCount</name></param>
|
||||
@@ -7886,10 +7909,16 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<param><type>VkImageDrmFormatModifierPropertiesEXT</type>* <name>pProperties</name></param>
|
||||
</command>
|
||||
<command>
|
||||
<proto><type>VkDeviceAddress</type> <name>vkGetBufferDeviceAddressEXT</name></proto>
|
||||
<proto><type>uint64_t</type> <name>vkGetBufferOpaqueCaptureAddressKHR</name></proto>
|
||||
<param><type>VkDevice</type> <name>device</name></param>
|
||||
<param>const <type>VkBufferDeviceAddressInfoEXT</type>* <name>pInfo</name></param>
|
||||
<param>const <type>VkBufferDeviceAddressInfoKHR</type>* <name>pInfo</name></param>
|
||||
</command>
|
||||
<command>
|
||||
<proto><type>VkDeviceAddress</type> <name>vkGetBufferDeviceAddressKHR</name></proto>
|
||||
<param><type>VkDevice</type> <name>device</name></param>
|
||||
<param>const <type>VkBufferDeviceAddressInfoKHR</type>* <name>pInfo</name></param>
|
||||
</command>
|
||||
<command name="vkGetBufferDeviceAddressEXT" alias="vkGetBufferDeviceAddressKHR"/>
|
||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
|
||||
<proto><type>VkResult</type> <name>vkCreateHeadlessSurfaceEXT</name></proto>
|
||||
<param><type>VkInstance</type> <name>instance</name></param>
|
||||
@@ -7949,6 +7978,11 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<param><type>VkPerformanceParameterTypeINTEL</type> <name>parameter</name></param>
|
||||
<param><type>VkPerformanceValueINTEL</type>* <name>pValue</name></param>
|
||||
</command>
|
||||
<command>
|
||||
<proto><type>uint64_t</type> <name>vkGetDeviceMemoryOpaqueCaptureAddressKHR</name></proto>
|
||||
<param><type>VkDevice</type> <name>device</name></param>
|
||||
<param>const <type>VkDeviceMemoryOpaqueCaptureAddressInfoKHR</type>* <name>pInfo</name></param>
|
||||
</command>
|
||||
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
|
||||
<proto><type>VkResult</type> <name>vkGetPipelineExecutablePropertiesKHR</name></proto>
|
||||
<param><type>VkDevice</type> <name>device</name></param>
|
||||
@@ -10367,6 +10401,7 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<enum value="0" name="VK_NV_EXTENSION_151_SPEC_VERSION"/>
|
||||
<enum value=""VK_NV_extension_151"" name="VK_NV_EXTENSION_151_EXTENSION_NAME"/>
|
||||
<enum bitpos="11" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_EXTENSION_151_BIT_NV"/>
|
||||
<enum bitpos="29" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_RESERVED_29_BIT_NV"/>
|
||||
</require>
|
||||
</extension>
|
||||
<extension name="VK_NV_extension_152" number="152" author="NV" contact="Jeff Bolz @jeffbolznv" supported="disabled">
|
||||
@@ -11399,17 +11434,17 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<enum value=""VK_MESA_extension_244"" name="VK_MESA_EXTENSION_244_EXTENSION_NAME"/>
|
||||
</require>
|
||||
</extension>
|
||||
<extension name="VK_EXT_buffer_device_address" number="245" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
|
||||
<extension name="VK_EXT_buffer_device_address" number="245" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Jeff Bolz @jeffbolznv" deprecatedby="VK_KHR_buffer_device_address" supported="vulkan">
|
||||
<require>
|
||||
<enum value="2" name="VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION"/>
|
||||
<enum value=""VK_EXT_buffer_device_address"" name="VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME"/>
|
||||
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT"/>
|
||||
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT"/>
|
||||
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT"/>
|
||||
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT"/>
|
||||
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT" alias="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR"/>
|
||||
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT"/>
|
||||
<enum bitpos="17" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT"/>
|
||||
<enum bitpos="4" extends="VkBufferCreateFlagBits" name="VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT"/>
|
||||
<enum offset="0" dir="-" extends="VkResult" name="VK_ERROR_INVALID_DEVICE_ADDRESS_EXT"/>
|
||||
<enum extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT" alias="VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR"/>
|
||||
<enum extends="VkBufferCreateFlagBits" name="VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT" alias="VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR"/>
|
||||
<enum extends="VkResult" name="VK_ERROR_INVALID_DEVICE_ADDRESS_EXT" alias="VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR"/>
|
||||
<type name="VkPhysicalDeviceBufferAddressFeaturesEXT"/>
|
||||
<type name="VkPhysicalDeviceBufferDeviceAddressFeaturesEXT"/>
|
||||
<type name="VkBufferDeviceAddressInfoEXT"/>
|
||||
@@ -11540,10 +11575,28 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<command name="vkCreateHeadlessSurfaceEXT"/>
|
||||
</require>
|
||||
</extension>
|
||||
<extension name="VK_EXT_extension_258" number="258" author="EXT" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="disabled">
|
||||
<extension name="VK_KHR_buffer_device_address" number="258" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
|
||||
<require>
|
||||
<enum value="0" name="VK_EXT_EXTENSION_258_SPEC_VERSION"/>
|
||||
<enum value=""VK_EXT_extension_258"" name="VK_EXT_EXTENSION_258_EXTENSION_NAME"/>
|
||||
<enum value="1" name="VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION"/>
|
||||
<enum value=""VK_KHR_buffer_device_address"" name="VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME"/>
|
||||
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR"/>
|
||||
<enum offset="1" extends="VkStructureType" extnumber="245" name="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR"/>
|
||||
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR"/>
|
||||
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR"/>
|
||||
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR"/>
|
||||
<enum bitpos="17" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR"/>
|
||||
<enum bitpos="4" extends="VkBufferCreateFlagBits" name="VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR"/>
|
||||
<enum bitpos="1" extends="VkMemoryAllocateFlagBits" name="VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR"/>
|
||||
<enum bitpos="2" extends="VkMemoryAllocateFlagBits" name="VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR"/>
|
||||
<enum offset="0" dir="-" extends="VkResult" extnumber="245" name="VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR"/>
|
||||
<type name="VkPhysicalDeviceBufferDeviceAddressFeaturesKHR"/>
|
||||
<type name="VkBufferDeviceAddressInfoKHR"/>
|
||||
<type name="VkBufferOpaqueCaptureAddressCreateInfoKHR"/>
|
||||
<type name="VkMemoryOpaqueCaptureAddressAllocateInfoKHR"/>
|
||||
<type name="VkDeviceMemoryOpaqueCaptureAddressInfoKHR"/>
|
||||
<command name="vkGetBufferDeviceAddressKHR"/>
|
||||
<command name="vkGetBufferOpaqueCaptureAddressKHR"/>
|
||||
<command name="vkGetDeviceMemoryOpaqueCaptureAddressKHR"/>
|
||||
</require>
|
||||
</extension>
|
||||
<extension name="VK_EXT_extension_259" number="259" author="EXT" contact="Jeff Leger @jackohound" supported="disabled">
|
||||
@@ -11834,5 +11887,23 @@ typedef void <name>CAMetalLayer</name>;
|
||||
<enum extends="VkResult" offset="0" name="VK_RESULT_EXT_298_RESERVED_VALUE_0_EXT"/>
|
||||
</require>
|
||||
</extension>
|
||||
<extension name="VK_KHR_extension_299" number="299" author="KHR" contact="Mark Bellamy @mark.bellamy_arm" supported="disabled">
|
||||
<require>
|
||||
<enum value="0" name="VK_KHR_EXTENSION_299_SPEC_VERSION"/>
|
||||
<enum value=""VK_KHR_extension_299"" name="VK_KHR_EXTENSION_299_EXTENSION_NAME"/>
|
||||
</require>
|
||||
</extension>
|
||||
<extension name="VK_KHR_extension_300" number="300" author="KHR" contact="Aidan Fabius @afabius" supported="disabled">
|
||||
<require>
|
||||
<enum value="0" name="VK_KHR_EXTENSION_300_SPEC_VERSION"/>
|
||||
<enum value=""VK_KHR_extension_300"" name="VK_KHR_EXTENSION_300_EXTENSION_NAME"/>
|
||||
</require>
|
||||
</extension>
|
||||
<extension name="VK_NV_extension_301" number="301" author="NV" contact="Kedarnath Thangudu @kthangudu" supported="disabled">
|
||||
<require>
|
||||
<enum value="0" name="VK_NV_EXTENSION_301_SPEC_VERSION"/>
|
||||
<enum value=""VK_NV_extension_301"" name="VK_NV_EXTENSION_301_EXTENSION_NAME"/>
|
||||
</require>
|
||||
</extension>
|
||||
</extensions>
|
||||
</registry>
|
||||
|
||||
@@ -37,7 +37,7 @@ struct feedbackData
|
||||
|
||||
void AnnotateShader(const SPIRVPatchData &patchData, const char *entryName,
|
||||
const std::map<rdcspv::Binding, feedbackData> &offsetMap, VkDeviceAddress addr,
|
||||
std::vector<uint32_t> &modSpirv)
|
||||
bool bufferAddressKHR, std::vector<uint32_t> &modSpirv)
|
||||
{
|
||||
rdcspv::Editor editor(modSpirv);
|
||||
|
||||
@@ -129,22 +129,23 @@ void AnnotateShader(const SPIRVPatchData &patchData, const char *entryName,
|
||||
if(useBufferAddress)
|
||||
{
|
||||
// add the extension
|
||||
editor.AddExtension("SPV_EXT_physical_storage_buffer");
|
||||
editor.AddExtension(bufferAddressKHR ? "SPV_KHR_physical_storage_buffer"
|
||||
: "SPV_EXT_physical_storage_buffer");
|
||||
|
||||
// change the memory model to physical storage buffer 64
|
||||
rdcspv::Iter it = editor.Begin(rdcspv::Section::MemoryModel);
|
||||
rdcspv::OpMemoryModel model(it);
|
||||
model.addressingModel = rdcspv::AddressingModel::PhysicalStorageBuffer64EXT;
|
||||
model.addressingModel = rdcspv::AddressingModel::PhysicalStorageBuffer64;
|
||||
it = model;
|
||||
|
||||
// add capabilities
|
||||
editor.AddCapability(rdcspv::Capability::PhysicalStorageBufferAddressesEXT);
|
||||
editor.AddCapability(rdcspv::Capability::PhysicalStorageBufferAddresses);
|
||||
editor.AddCapability(rdcspv::Capability::Int64);
|
||||
|
||||
// declare the address constants and make our pointers physical storage buffer pointers
|
||||
bufferAddressConst = editor.AddConstantImmediate<uint64_t>(addr);
|
||||
uint32ptrtype =
|
||||
editor.DeclareType(rdcspv::Pointer(uint32ID, rdcspv::StorageClass::PhysicalStorageBufferEXT));
|
||||
editor.DeclareType(rdcspv::Pointer(uint32ID, rdcspv::StorageClass::PhysicalStorageBuffer));
|
||||
|
||||
editor.SetName(bufferAddressConst, "__rd_feedbackAddress");
|
||||
|
||||
@@ -526,8 +527,11 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
|
||||
// if it actually has any data in it later.
|
||||
DynamicUsedBinds &result = m_BindlessFeedback.Usage[eventId];
|
||||
|
||||
bool useBufferAddress =
|
||||
ObjDisp(m_Device)->GetBufferDeviceAddressEXT && m_pDriver->GetDeviceFeatures().shaderInt64;
|
||||
bool useBufferAddress = (m_pDriver->GetExtensions(NULL).ext_KHR_buffer_device_address ||
|
||||
m_pDriver->GetExtensions(NULL).ext_EXT_buffer_device_address) &&
|
||||
m_pDriver->GetDeviceFeatures().shaderInt64;
|
||||
|
||||
bool useBufferAddressKHR = m_pDriver->GetExtensions(NULL).ext_KHR_buffer_device_address;
|
||||
|
||||
const VulkanRenderState &state = m_pDriver->m_RenderState;
|
||||
VulkanCreationInfo &creationInfo = m_pDriver->m_CreationInfo;
|
||||
@@ -622,10 +626,16 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
|
||||
|
||||
if(useBufferAddress)
|
||||
{
|
||||
VkBufferDeviceAddressInfoEXT getAddressInfo = {VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT};
|
||||
RDCCOMPILE_ASSERT(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR ==
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT,
|
||||
"KHR and EXT buffer_device_address should be interchangeable here.");
|
||||
VkBufferDeviceAddressInfoKHR getAddressInfo = {VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR};
|
||||
getAddressInfo.buffer = m_BindlessFeedback.FeedbackBuffer.buf;
|
||||
|
||||
bufferAddress = m_pDriver->vkGetBufferDeviceAddressEXT(dev, &getAddressInfo);
|
||||
if(useBufferAddressKHR)
|
||||
bufferAddress = m_pDriver->vkGetBufferDeviceAddressKHR(dev, &getAddressInfo);
|
||||
else
|
||||
bufferAddress = m_pDriver->vkGetBufferDeviceAddressEXT(dev, &getAddressInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -704,7 +714,8 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
|
||||
|
||||
std::vector<uint32_t> modSpirv = moduleInfo.spirv.GetSPIRV();
|
||||
|
||||
AnnotateShader(*pipeInfo.shaders[5].patchData, stage.pName, offsetMap, bufferAddress, modSpirv);
|
||||
AnnotateShader(*pipeInfo.shaders[5].patchData, stage.pName, offsetMap, bufferAddress,
|
||||
useBufferAddressKHR, modSpirv);
|
||||
|
||||
moduleCreateInfo.pCode = modSpirv.data();
|
||||
moduleCreateInfo.codeSize = modSpirv.size() * sizeof(uint32_t);
|
||||
@@ -729,7 +740,7 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
|
||||
std::vector<uint32_t> modSpirv = moduleInfo.spirv.GetSPIRV();
|
||||
|
||||
AnnotateShader(*pipeInfo.shaders[idx].patchData, stage.pName, offsetMap, bufferAddress,
|
||||
modSpirv);
|
||||
useBufferAddressKHR, modSpirv);
|
||||
|
||||
moduleCreateInfo.pCode = modSpirv.data();
|
||||
moduleCreateInfo.codeSize = modSpirv.size() * sizeof(uint32_t);
|
||||
|
||||
@@ -180,7 +180,7 @@ void GPUBuffer::Create(WrappedVulkan *driver, VkDevice dev, VkDeviceSize size, u
|
||||
bufInfo.usage |= VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT;
|
||||
|
||||
if(flags & eGPUBufferAddressable)
|
||||
bufInfo.usage |= VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT;
|
||||
bufInfo.usage |= VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR;
|
||||
|
||||
VkResult vkr = driver->vkCreateBuffer(dev, &bufInfo, NULL, &buf);
|
||||
RDCASSERTEQUAL(vkr, VK_SUCCESS);
|
||||
|
||||
@@ -660,9 +660,10 @@ DECLARE_REFLECTION_STRUCT(VkBindImagePlaneMemoryInfo);
|
||||
DECLARE_REFLECTION_STRUCT(VkBindSparseInfo);
|
||||
DECLARE_REFLECTION_STRUCT(VkBufferCreateInfo);
|
||||
DECLARE_REFLECTION_STRUCT(VkBufferDeviceAddressCreateInfoEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkBufferDeviceAddressInfoEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkBufferDeviceAddressInfoKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkBufferMemoryBarrier);
|
||||
DECLARE_REFLECTION_STRUCT(VkBufferMemoryRequirementsInfo2);
|
||||
DECLARE_REFLECTION_STRUCT(VkBufferOpaqueCaptureAddressCreateInfoKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkBufferViewCreateInfo);
|
||||
DECLARE_REFLECTION_STRUCT(VkCalibratedTimestampInfoEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkCommandBufferAllocateInfo);
|
||||
@@ -703,6 +704,7 @@ DECLARE_REFLECTION_STRUCT(VkDeviceGroupPresentInfoKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkDeviceGroupRenderPassBeginInfo);
|
||||
DECLARE_REFLECTION_STRUCT(VkDeviceGroupSubmitInfo);
|
||||
DECLARE_REFLECTION_STRUCT(VkDeviceGroupSwapchainCreateInfoKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkDeviceMemoryOpaqueCaptureAddressInfoKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkDeviceQueueCreateInfo);
|
||||
DECLARE_REFLECTION_STRUCT(VkDeviceQueueGlobalPriorityCreateInfoEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkDeviceQueueInfo2);
|
||||
@@ -762,17 +764,19 @@ DECLARE_REFLECTION_STRUCT(VkMemoryDedicatedAllocateInfo);
|
||||
DECLARE_REFLECTION_STRUCT(VkMemoryDedicatedRequirements);
|
||||
DECLARE_REFLECTION_STRUCT(VkMemoryFdPropertiesKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkMemoryGetFdInfoKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkMemoryOpaqueCaptureAddressAllocateInfoKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkMemoryPriorityAllocateInfoEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkMemoryRequirements2);
|
||||
DECLARE_REFLECTION_STRUCT(VkMultisamplePropertiesEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkPastPresentationTimingGOOGLE);
|
||||
DECLARE_REFLECTION_STRUCT(VkPerformanceCounterKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkPerformanceCounterDescriptionKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkPerformanceCounterKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkPerformanceQuerySubmitInfoKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDevice16BitStorageFeatures);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDevice8BitStorageFeaturesKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceASTCDecodeFeaturesEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceBufferDeviceAddressFeaturesKHR);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceCoherentMemoryFeaturesAMD);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceConditionalRenderingFeaturesEXT);
|
||||
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceConservativeRasterizationPropertiesEXT);
|
||||
@@ -941,6 +945,7 @@ DECLARE_DESERIALISE_TYPE(VkBindSparseInfo);
|
||||
DECLARE_DESERIALISE_TYPE(VkBufferCreateInfo);
|
||||
DECLARE_DESERIALISE_TYPE(VkBufferMemoryBarrier);
|
||||
DECLARE_DESERIALISE_TYPE(VkBufferMemoryRequirementsInfo2);
|
||||
DECLARE_DESERIALISE_TYPE(VkBufferOpaqueCaptureAddressCreateInfoKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkBufferViewCreateInfo);
|
||||
DECLARE_DESERIALISE_TYPE(VkCalibratedTimestampInfoEXT);
|
||||
DECLARE_DESERIALISE_TYPE(VkCommandBufferAllocateInfo);
|
||||
@@ -981,6 +986,7 @@ DECLARE_DESERIALISE_TYPE(VkDeviceGroupPresentInfoKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkDeviceGroupRenderPassBeginInfo);
|
||||
DECLARE_DESERIALISE_TYPE(VkDeviceGroupSubmitInfo);
|
||||
DECLARE_DESERIALISE_TYPE(VkDeviceGroupSwapchainCreateInfoKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkDeviceMemoryOpaqueCaptureAddressInfoKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkDeviceQueueCreateInfo);
|
||||
DECLARE_DESERIALISE_TYPE(VkDeviceQueueGlobalPriorityCreateInfoEXT);
|
||||
DECLARE_DESERIALISE_TYPE(VkDeviceQueueInfo2);
|
||||
@@ -1039,6 +1045,7 @@ DECLARE_DESERIALISE_TYPE(VkMemoryDedicatedAllocateInfo);
|
||||
DECLARE_DESERIALISE_TYPE(VkMemoryDedicatedRequirements);
|
||||
DECLARE_DESERIALISE_TYPE(VkMemoryFdPropertiesKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkMemoryGetFdInfoKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkMemoryOpaqueCaptureAddressAllocateInfoKHR);
|
||||
DECLARE_DESERIALISE_TYPE(VkMemoryPriorityAllocateInfoEXT);
|
||||
DECLARE_DESERIALISE_TYPE(VkMemoryRequirements2);
|
||||
DECLARE_DESERIALISE_TYPE(VkMultisamplePropertiesEXT);
|
||||
|
||||
@@ -1257,6 +1257,36 @@ VkResult WrappedVulkan::FilterDeviceExtensionProperties(VkPhysicalDevice physDev
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!strcmp(it->extensionName, VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME))
|
||||
{
|
||||
// require GPDP2
|
||||
if(instDevInfo->ext_KHR_get_physical_device_properties2)
|
||||
{
|
||||
VkPhysicalDeviceBufferDeviceAddressFeaturesKHR bufaddr = {
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR};
|
||||
VkPhysicalDeviceFeatures2 base = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2};
|
||||
base.pNext = &bufaddr;
|
||||
ObjDisp(physDev)->GetPhysicalDeviceFeatures2(Unwrap(physDev), &base);
|
||||
|
||||
if(bufaddr.bufferDeviceAddressCaptureReplay)
|
||||
{
|
||||
// supported
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCWARN(
|
||||
"VkPhysicalDeviceBufferDeviceAddressFeaturesKHR.bufferDeviceAddressCaptureReplay "
|
||||
"is false, can't support capture of VK_KHR_buffer_device_address");
|
||||
}
|
||||
}
|
||||
|
||||
// if it wasn't supported, remove the extension
|
||||
it = filtered.erase(it);
|
||||
continue;
|
||||
}
|
||||
|
||||
++it;
|
||||
}
|
||||
|
||||
|
||||
@@ -2208,4 +2208,11 @@ public:
|
||||
const VkQueryPoolPerformanceCreateInfoKHR *pPerformanceQueryCreateInfo, uint32_t *pNumPasses);
|
||||
VkResult vkAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR *pInfo);
|
||||
void vkReleaseProfilingLockKHR(VkDevice device);
|
||||
|
||||
// VK_KHR_buffer_device_address
|
||||
|
||||
VkDeviceAddress vkGetBufferDeviceAddressKHR(VkDevice device, VkBufferDeviceAddressInfoKHR *pInfo);
|
||||
uint64_t vkGetBufferOpaqueCaptureAddressKHR(VkDevice device, VkBufferDeviceAddressInfoKHR *pInfo);
|
||||
uint64_t vkGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device,
|
||||
VkDeviceMemoryOpaqueCaptureAddressInfoKHR *pInfo);
|
||||
};
|
||||
|
||||
@@ -514,6 +514,11 @@ struct VkDevDispatchTable
|
||||
PFN_vkWaitSemaphoresKHR WaitSemaphoresKHR;
|
||||
PFN_vkSignalSemaphoreKHR SignalSemaphoreKHR;
|
||||
|
||||
// VK_KHR_buffer_device_address
|
||||
PFN_vkGetBufferDeviceAddressKHR GetBufferDeviceAddressKHR;
|
||||
PFN_vkGetBufferOpaqueCaptureAddressKHR GetBufferOpaqueCaptureAddressKHR;
|
||||
PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR GetDeviceMemoryOpaqueCaptureAddressKHR;
|
||||
|
||||
// VK_KHR_pipeline_executable_properties
|
||||
PFN_vkGetPipelineExecutablePropertiesKHR GetPipelineExecutablePropertiesKHR;
|
||||
PFN_vkGetPipelineExecutableStatisticsKHR GetPipelineExecutableStatisticsKHR;
|
||||
|
||||
@@ -453,7 +453,8 @@
|
||||
DeclExt(EXT_line_rasterization); \
|
||||
DeclExt(GOOGLE_display_timing); \
|
||||
DeclExt(KHR_timeline_semaphore); \
|
||||
DeclExt(KHR_performance_query);
|
||||
DeclExt(KHR_performance_query); \
|
||||
DeclExt(KHR_buffer_device_address);
|
||||
|
||||
// for simplicity and since the check itself is platform agnostic,
|
||||
// these aren't protected in platform defines
|
||||
@@ -541,7 +542,8 @@
|
||||
CheckExt(EXT_line_rasterization, VKXX); \
|
||||
CheckExt(GOOGLE_display_timing, VKXX); \
|
||||
CheckExt(KHR_timeline_semaphore, VKXX); \
|
||||
CheckExt(KHR_performance_query, VKXX);
|
||||
CheckExt(KHR_performance_query, VKXX); \
|
||||
CheckExt(KHR_buffer_device_address, VKXX);
|
||||
|
||||
#define HookInitVulkanInstanceExts() \
|
||||
HookInitExtension(KHR_surface, DestroySurfaceKHR); \
|
||||
@@ -695,6 +697,9 @@
|
||||
HookInitExtension(KHR_timeline_semaphore, SignalSemaphoreKHR); \
|
||||
HookInitExtension(KHR_performance_query, AcquireProfilingLockKHR); \
|
||||
HookInitExtension(KHR_performance_query, ReleaseProfilingLockKHR); \
|
||||
HookInitExtension(KHR_buffer_device_address, GetBufferDeviceAddressKHR); \
|
||||
HookInitExtension(KHR_buffer_device_address, GetBufferOpaqueCaptureAddressKHR); \
|
||||
HookInitExtension(KHR_buffer_device_address, GetDeviceMemoryOpaqueCaptureAddressKHR); \
|
||||
HookInitDevice_PlatformSpecific()
|
||||
|
||||
#define DefineHooks() \
|
||||
@@ -1307,4 +1312,10 @@
|
||||
HookDefine2(VkResult, vkAcquireProfilingLockKHR, VkDevice, device, \
|
||||
const VkAcquireProfilingLockInfoKHR *, pInfo); \
|
||||
HookDefine1(void, vkReleaseProfilingLockKHR, VkDevice, device); \
|
||||
HookDefine2(VkDeviceAddress, vkGetBufferDeviceAddressKHR, VkDevice, device, \
|
||||
VkBufferDeviceAddressInfoKHR *, pInfo); \
|
||||
HookDefine2(uint64_t, vkGetBufferOpaqueCaptureAddressKHR, VkDevice, device, \
|
||||
VkBufferDeviceAddressInfoKHR *, pInfo); \
|
||||
HookDefine2(uint64_t, vkGetDeviceMemoryOpaqueCaptureAddressKHR, VkDevice, device, \
|
||||
VkDeviceMemoryOpaqueCaptureAddressInfoKHR *, pInfo); \
|
||||
HookDefine_PlatformSpecific()
|
||||
|
||||
@@ -878,14 +878,6 @@ void VulkanCreationInfo::Buffer::Init(VulkanResourceManager *resourceMan, Vulkan
|
||||
{
|
||||
usage = pCreateInfo->usage;
|
||||
size = pCreateInfo->size;
|
||||
|
||||
const VkBufferDeviceAddressCreateInfoEXT *deviceAddress =
|
||||
(const VkBufferDeviceAddressCreateInfoEXT *)FindNextStruct(
|
||||
pCreateInfo, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT);
|
||||
if(deviceAddress)
|
||||
gpuAddress = deviceAddress->deviceAddress;
|
||||
else
|
||||
gpuAddress = 0;
|
||||
}
|
||||
|
||||
void VulkanCreationInfo::BufferView::Init(VulkanResourceManager *resourceMan,
|
||||
|
||||
@@ -414,7 +414,6 @@ struct VulkanCreationInfo
|
||||
|
||||
VkBufferUsageFlags usage;
|
||||
uint64_t size;
|
||||
uint64_t gpuAddress;
|
||||
};
|
||||
std::map<ResourceId, Buffer> m_Buffer;
|
||||
|
||||
|
||||
@@ -83,6 +83,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, VkBufferCreateInfo); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT, \
|
||||
VkBufferDeviceAddressCreateInfoEXT); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR, \
|
||||
VkBufferOpaqueCaptureAddressCreateInfoKHR); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT, VkCalibratedTimestampInfoEXT); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, VkCommandBufferBeginInfo); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT, \
|
||||
@@ -153,6 +155,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, VkMemoryAllocateInfo); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_BARRIER, VkMemoryBarrier); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, VkMemoryDedicatedRequirements); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR, \
|
||||
VkMemoryOpaqueCaptureAddressAllocateInfoKHR); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT, VkMemoryPriorityAllocateInfoEXT); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, VkMemoryRequirements2); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT, VkMultisamplePropertiesEXT); \
|
||||
@@ -164,6 +168,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
|
||||
VkPhysicalDeviceASTCDecodeFeaturesEXT); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT, \
|
||||
VkPhysicalDeviceBufferDeviceAddressFeaturesEXT); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR, \
|
||||
VkPhysicalDeviceBufferDeviceAddressFeaturesKHR); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD, \
|
||||
VkPhysicalDeviceCoherentMemoryFeaturesAMD); \
|
||||
COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT, \
|
||||
@@ -424,7 +430,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
|
||||
UnwrapInPlace(out->image), UnwrapInPlace(out->memory)); \
|
||||
UNWRAP_STRUCT(VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, VkBufferMemoryBarrier, \
|
||||
UnwrapInPlace(out->buffer)); \
|
||||
UNWRAP_STRUCT(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT, VkBufferDeviceAddressInfoEXT, \
|
||||
/* VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT aliased by KHR */ \
|
||||
UNWRAP_STRUCT(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR, VkBufferDeviceAddressInfoKHR, \
|
||||
UnwrapInPlace(out->buffer)); \
|
||||
UNWRAP_STRUCT(VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2, \
|
||||
VkBufferMemoryRequirementsInfo2, UnwrapInPlace(out->buffer)); \
|
||||
@@ -444,6 +451,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct,
|
||||
UNWRAP_STRUCT(VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, \
|
||||
VkDescriptorUpdateTemplateCreateInfo, UnwrapInPlace(out->descriptorSetLayout), \
|
||||
UnwrapInPlace(out->pipelineLayout)); \
|
||||
UNWRAP_STRUCT(VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR, \
|
||||
VkDeviceMemoryOpaqueCaptureAddressInfoKHR, UnwrapInPlace(out->memory)); \
|
||||
UNWRAP_STRUCT(VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, VkImageMemoryBarrier, \
|
||||
UnwrapInPlace(out->image)); \
|
||||
UNWRAP_STRUCT(VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, \
|
||||
|
||||
@@ -446,7 +446,6 @@ SERIALISE_VK_HANDLES();
|
||||
VkPhysicalDeviceASTCDecodeFeaturesEXT) \
|
||||
\
|
||||
/* VK_EXT_buffer_device_address */ \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT, VkBufferDeviceAddressInfoEXT) \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT, \
|
||||
VkBufferDeviceAddressCreateInfoEXT) \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT, \
|
||||
@@ -666,6 +665,17 @@ SERIALISE_VK_HANDLES();
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO, VkBindBufferMemoryInfo) \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO, VkBindImageMemoryInfo) \
|
||||
\
|
||||
/* VK_KHR_buffer_device_address */ \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR, \
|
||||
VkPhysicalDeviceBufferDeviceAddressFeaturesKHR) \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR, VkBufferDeviceAddressInfoKHR) \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR, \
|
||||
VkBufferOpaqueCaptureAddressCreateInfoKHR) \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR, \
|
||||
VkMemoryOpaqueCaptureAddressAllocateInfoKHR) \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR, \
|
||||
VkDeviceMemoryOpaqueCaptureAddressInfoKHR) \
|
||||
\
|
||||
/* VK_KHR_create_renderpass2 */ \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR, VkAttachmentDescription2KHR) \
|
||||
PNEXT_STRUCT(VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR, VkAttachmentReference2KHR) \
|
||||
@@ -4924,16 +4934,82 @@ void Deserialise(const VkPhysicalDeviceASTCDecodeFeaturesEXT &el)
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, VkBufferDeviceAddressInfoEXT &el)
|
||||
void DoSerialise(SerialiserType &ser, VkPhysicalDeviceBufferDeviceAddressFeaturesKHR &el)
|
||||
{
|
||||
RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT);
|
||||
RDCASSERT(ser.IsReading() ||
|
||||
el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR);
|
||||
SerialiseNext(ser, el.sType, el.pNext);
|
||||
|
||||
SERIALISE_MEMBER(bufferDeviceAddress);
|
||||
SERIALISE_MEMBER(bufferDeviceAddressCaptureReplay);
|
||||
SERIALISE_MEMBER(bufferDeviceAddressMultiDevice);
|
||||
}
|
||||
|
||||
template <>
|
||||
void Deserialise(const VkPhysicalDeviceBufferDeviceAddressFeaturesKHR &el)
|
||||
{
|
||||
DeserialiseNext(el.pNext);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, VkBufferDeviceAddressInfoKHR &el)
|
||||
{
|
||||
RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR);
|
||||
SerialiseNext(ser, el.sType, el.pNext);
|
||||
|
||||
SERIALISE_MEMBER(buffer);
|
||||
}
|
||||
|
||||
template <>
|
||||
void Deserialise(const VkBufferDeviceAddressInfoEXT &el)
|
||||
void Deserialise(const VkBufferDeviceAddressInfoKHR &el)
|
||||
{
|
||||
DeserialiseNext(el.pNext);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, VkBufferOpaqueCaptureAddressCreateInfoKHR &el)
|
||||
{
|
||||
RDCASSERT(ser.IsReading() ||
|
||||
el.sType == VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR);
|
||||
SerialiseNext(ser, el.sType, el.pNext);
|
||||
|
||||
SERIALISE_MEMBER(opaqueCaptureAddress);
|
||||
}
|
||||
|
||||
template <>
|
||||
void Deserialise(const VkBufferOpaqueCaptureAddressCreateInfoKHR &el)
|
||||
{
|
||||
DeserialiseNext(el.pNext);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, VkMemoryOpaqueCaptureAddressAllocateInfoKHR &el)
|
||||
{
|
||||
RDCASSERT(ser.IsReading() ||
|
||||
el.sType == VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR);
|
||||
SerialiseNext(ser, el.sType, el.pNext);
|
||||
|
||||
SERIALISE_MEMBER(opaqueCaptureAddress);
|
||||
}
|
||||
|
||||
template <>
|
||||
void Deserialise(const VkMemoryOpaqueCaptureAddressAllocateInfoKHR &el)
|
||||
{
|
||||
DeserialiseNext(el.pNext);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, VkDeviceMemoryOpaqueCaptureAddressInfoKHR &el)
|
||||
{
|
||||
RDCASSERT(ser.IsReading() ||
|
||||
el.sType == VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR);
|
||||
SerialiseNext(ser, el.sType, el.pNext);
|
||||
|
||||
SERIALISE_MEMBER(memory);
|
||||
}
|
||||
|
||||
template <>
|
||||
void Deserialise(const VkDeviceMemoryOpaqueCaptureAddressInfoKHR &el)
|
||||
{
|
||||
DeserialiseNext(el.pNext);
|
||||
}
|
||||
@@ -7536,9 +7612,10 @@ INSTANTIATE_SERIALISE_TYPE(VkBindImagePlaneMemoryInfo);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkBindSparseInfo);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkBufferCreateInfo);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkBufferDeviceAddressCreateInfoEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkBufferDeviceAddressInfoEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkBufferDeviceAddressInfoKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkBufferMemoryBarrier);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkBufferMemoryRequirementsInfo2);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkBufferOpaqueCaptureAddressCreateInfoKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkBufferViewCreateInfo);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkCalibratedTimestampInfoEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkCommandBufferAllocateInfo);
|
||||
@@ -7579,6 +7656,7 @@ INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupPresentInfoKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupRenderPassBeginInfo);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupSubmitInfo);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupSwapchainCreateInfoKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkDeviceMemoryOpaqueCaptureAddressInfoKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkDeviceQueueCreateInfo);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkDeviceQueueGlobalPriorityCreateInfoEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkDeviceQueueInfo2);
|
||||
@@ -7638,14 +7716,16 @@ INSTANTIATE_SERIALISE_TYPE(VkMemoryDedicatedAllocateInfo);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkMemoryDedicatedRequirements);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkMemoryFdPropertiesKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkMemoryGetFdInfoKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkMemoryOpaqueCaptureAddressAllocateInfoKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkMemoryPriorityAllocateInfoEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkMemoryRequirements2);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkMultisamplePropertiesEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPastPresentationTimingGOOGLE);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevice16BitStorageFeatures);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevice8BitStorageFeaturesKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceASTCDecodeFeaturesEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceASTCDecodeFeaturesEXT)
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceBufferDeviceAddressFeaturesKHR);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceCoherentMemoryFeaturesAMD);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceConditionalRenderingFeaturesEXT);
|
||||
INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceConservativeRasterizationPropertiesEXT);
|
||||
|
||||
@@ -329,7 +329,7 @@ rdcstr DoStringise(const VkBufferUsageFlagBits &el)
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT);
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT);
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_USAGE_RAY_TRACING_BIT_NV);
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT);
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR);
|
||||
}
|
||||
END_BITFIELD_STRINGISE();
|
||||
}
|
||||
@@ -372,7 +372,7 @@ rdcstr DoStringise(const VkBufferCreateFlagBits &el)
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT);
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_CREATE_SPARSE_ALIASED_BIT);
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_CREATE_PROTECTED_BIT);
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT);
|
||||
STRINGISE_BITFIELD_BIT(VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR);
|
||||
}
|
||||
END_BITFIELD_STRINGISE();
|
||||
}
|
||||
@@ -823,6 +823,8 @@ rdcstr DoStringise(const VkMemoryAllocateFlagBits &el)
|
||||
BEGIN_BITFIELD_STRINGISE(VkMemoryAllocateFlagBits);
|
||||
{
|
||||
STRINGISE_BITFIELD_BIT(VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT);
|
||||
STRINGISE_BITFIELD_BIT(VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR);
|
||||
STRINGISE_BITFIELD_BIT(VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR);
|
||||
}
|
||||
END_BITFIELD_STRINGISE();
|
||||
}
|
||||
@@ -1712,7 +1714,6 @@ rdcstr DoStringise(const VkStructureType &el)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT)
|
||||
@@ -1729,6 +1730,11 @@ rdcstr DoStringise(const VkStructureType &el)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT)
|
||||
STRINGISE_ENUM(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT)
|
||||
@@ -2047,8 +2053,8 @@ rdcstr DoStringise(const VkResult &el)
|
||||
STRINGISE_ENUM(VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT)
|
||||
STRINGISE_ENUM(VK_ERROR_FRAGMENTATION_EXT)
|
||||
STRINGISE_ENUM(VK_ERROR_NOT_PERMITTED_EXT)
|
||||
STRINGISE_ENUM(VK_ERROR_INVALID_DEVICE_ADDRESS_EXT)
|
||||
STRINGISE_ENUM(VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT)
|
||||
STRINGISE_ENUM(VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR)
|
||||
}
|
||||
END_ENUM_STRINGISE();
|
||||
}
|
||||
|
||||
@@ -1576,8 +1576,14 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
|
||||
"geometry/tessellation stages will not be available");
|
||||
}
|
||||
|
||||
if(supportedExtensions.find(VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME) !=
|
||||
if(supportedExtensions.find(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME) !=
|
||||
supportedExtensions.end())
|
||||
{
|
||||
Extensions.push_back(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME);
|
||||
RDCLOG("Enabling VK_KHR_buffer_device_address");
|
||||
}
|
||||
else if(supportedExtensions.find(VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME) !=
|
||||
supportedExtensions.end())
|
||||
{
|
||||
Extensions.push_back(VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME);
|
||||
RDCLOG("Enabling VK_EXT_buffer_device_address");
|
||||
@@ -1585,7 +1591,7 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
|
||||
else
|
||||
{
|
||||
RDCWARN(
|
||||
"VK_EXT_buffer_device_address not available, feedback from "
|
||||
"VK_[KHR|EXT]_buffer_device_address not available, feedback from "
|
||||
"bindless shader access will use less reliable fallback");
|
||||
}
|
||||
|
||||
@@ -2187,6 +2193,25 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
|
||||
}
|
||||
END_PHYS_EXT_CHECK();
|
||||
|
||||
BEGIN_PHYS_EXT_CHECK(VkPhysicalDeviceBufferDeviceAddressFeaturesKHR,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR);
|
||||
{
|
||||
CHECK_PHYS_EXT_FEATURE(bufferDeviceAddress);
|
||||
CHECK_PHYS_EXT_FEATURE(bufferDeviceAddressCaptureReplay);
|
||||
CHECK_PHYS_EXT_FEATURE(bufferDeviceAddressMultiDevice);
|
||||
|
||||
if(ext->bufferDeviceAddress && !avail.bufferDeviceAddressCaptureReplay)
|
||||
{
|
||||
m_FailedReplayStatus = ReplayStatus::APIHardwareUnsupported;
|
||||
RDCERR(
|
||||
"Capture requires bufferDeviceAddress support, which is available, but "
|
||||
"bufferDeviceAddressCaptureReplay support is not available which is required to "
|
||||
"replay");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
END_PHYS_EXT_CHECK();
|
||||
|
||||
BEGIN_PHYS_EXT_CHECK(VkPhysicalDeviceDescriptorIndexingFeaturesEXT,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT);
|
||||
{
|
||||
@@ -3008,16 +3033,20 @@ VkResult WrappedVulkan::vkCreateDevice(VkPhysicalDevice physicalDevice,
|
||||
fragmentDensityMapFeatures->fragmentDensityMapNonSubsampledImages = true;
|
||||
}
|
||||
|
||||
VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *bufferAddressFeatures =
|
||||
VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *bufferAddressFeaturesEXT =
|
||||
(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)FindNextStruct(
|
||||
&createInfo, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT);
|
||||
VkPhysicalDeviceBufferDeviceAddressFeaturesKHR *bufferAddressFeaturesKHR =
|
||||
(VkPhysicalDeviceBufferDeviceAddressFeaturesKHR *)FindNextStruct(
|
||||
&createInfo, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR);
|
||||
|
||||
if(bufferAddressFeatures)
|
||||
{
|
||||
// we must turn on bufferDeviceAddressCaptureReplay. We verified that this feature was available
|
||||
// before we whitelisted the extension
|
||||
bufferAddressFeatures->bufferDeviceAddressCaptureReplay = VK_TRUE;
|
||||
}
|
||||
// we must turn on bufferDeviceAddressCaptureReplay. We verified that this feature was available
|
||||
// before we whitelisted the extension
|
||||
if(bufferAddressFeaturesKHR)
|
||||
bufferAddressFeaturesKHR->bufferDeviceAddressCaptureReplay = VK_TRUE;
|
||||
|
||||
if(bufferAddressFeaturesEXT)
|
||||
bufferAddressFeaturesEXT->bufferDeviceAddressCaptureReplay = VK_TRUE;
|
||||
|
||||
VkResult ret;
|
||||
SERIALISE_TIME_CALL(ret = createFunc(Unwrap(physicalDevice), &createInfo, pAllocator, pDevice));
|
||||
|
||||
@@ -759,4 +759,28 @@ VkResult WrappedVulkan::vkGetPipelineExecutableInternalRepresentationsKHR(
|
||||
unwrappedInfo.pipeline = Unwrap(unwrappedInfo.pipeline);
|
||||
return ObjDisp(device)->GetPipelineExecutableInternalRepresentationsKHR(
|
||||
Unwrap(device), &unwrappedInfo, pInternalRepresentationCount, pInternalRepresentations);
|
||||
}
|
||||
|
||||
VkDeviceAddress WrappedVulkan::vkGetBufferDeviceAddressKHR(VkDevice device,
|
||||
VkBufferDeviceAddressInfoKHR *pInfo)
|
||||
{
|
||||
VkBufferDeviceAddressInfoKHR unwrappedInfo = *pInfo;
|
||||
unwrappedInfo.buffer = Unwrap(unwrappedInfo.buffer);
|
||||
return ObjDisp(device)->GetBufferDeviceAddressKHR(Unwrap(device), &unwrappedInfo);
|
||||
}
|
||||
|
||||
uint64_t WrappedVulkan::vkGetBufferOpaqueCaptureAddressKHR(VkDevice device,
|
||||
VkBufferDeviceAddressInfoKHR *pInfo)
|
||||
{
|
||||
VkBufferDeviceAddressInfoKHR unwrappedInfo = *pInfo;
|
||||
unwrappedInfo.buffer = Unwrap(unwrappedInfo.buffer);
|
||||
return ObjDisp(device)->GetBufferOpaqueCaptureAddressKHR(Unwrap(device), &unwrappedInfo);
|
||||
}
|
||||
|
||||
uint64_t WrappedVulkan::vkGetDeviceMemoryOpaqueCaptureAddressKHR(
|
||||
VkDevice device, VkDeviceMemoryOpaqueCaptureAddressInfoKHR *pInfo)
|
||||
{
|
||||
VkDeviceMemoryOpaqueCaptureAddressInfoKHR unwrappedInfo = *pInfo;
|
||||
unwrappedInfo.memory = Unwrap(unwrappedInfo.memory);
|
||||
return ObjDisp(device)->GetDeviceMemoryOpaqueCaptureAddressKHR(Unwrap(device), &unwrappedInfo);
|
||||
}
|
||||
@@ -395,6 +395,16 @@ VkResult WrappedVulkan::vkAllocateMemory(VkDevice device, const VkMemoryAllocate
|
||||
|
||||
UnwrapNextChain(m_State, "VkMemoryAllocateInfo", tempMem, (VkBaseInStructure *)&unwrapped);
|
||||
|
||||
VkMemoryAllocateFlagsInfo *memFlags = (VkMemoryAllocateFlagsInfo *)FindNextStruct(
|
||||
&unwrapped, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO);
|
||||
|
||||
// since the application must specify VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR itself, we can
|
||||
// assume the struct is present and just add the capture-replay flag to allow us to specify the
|
||||
// address on replay. We ensured the physical device can support this feature (and it was enabled)
|
||||
// when whitelisting the extension and creating the device.
|
||||
if(memFlags && (memFlags->flags & VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR))
|
||||
memFlags->flags |= VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR;
|
||||
|
||||
VkResult ret;
|
||||
SERIALISE_TIME_CALL(
|
||||
ret = ObjDisp(device)->AllocateMemory(Unwrap(device), &unwrapped, pAllocator, pMemory));
|
||||
@@ -411,19 +421,47 @@ VkResult WrappedVulkan::vkAllocateMemory(VkDevice device, const VkMemoryAllocate
|
||||
{
|
||||
Chunk *chunk = NULL;
|
||||
|
||||
{
|
||||
CACHE_THREAD_SERIALISER();
|
||||
|
||||
SCOPED_SERIALISE_CHUNK(VulkanChunk::vkAllocateMemory);
|
||||
Serialise_vkAllocateMemory(ser, device, &info, NULL, pMemory);
|
||||
|
||||
chunk = scope.Get();
|
||||
}
|
||||
VkMemoryAllocateInfo serialisedInfo = info;
|
||||
VkMemoryOpaqueCaptureAddressAllocateInfoKHR memoryDeviceAddress = {
|
||||
VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR,
|
||||
};
|
||||
|
||||
// create resource record for gpu memory
|
||||
VkResourceRecord *record = GetResourceManager()->AddResourceRecord(*pMemory);
|
||||
RDCASSERT(record);
|
||||
|
||||
memFlags = (VkMemoryAllocateFlagsInfo *)FindNextStruct(
|
||||
&serialisedInfo, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO);
|
||||
|
||||
if(memFlags && (memFlags->flags & VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR))
|
||||
{
|
||||
VkDeviceMemoryOpaqueCaptureAddressInfoKHR getInfo = {
|
||||
VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR, NULL, Unwrap(*pMemory),
|
||||
};
|
||||
|
||||
memoryDeviceAddress.opaqueCaptureAddress =
|
||||
ObjDisp(device)->GetDeviceMemoryOpaqueCaptureAddressKHR(Unwrap(device), &getInfo);
|
||||
|
||||
// we explicitly DON'T assert on this, because some drivers will only need the device
|
||||
// address specified at allocate time.
|
||||
// RDCASSERT(memoryDeviceAddress.opaqueCaptureAddress);
|
||||
|
||||
// push this struct onto the start of the chain
|
||||
memoryDeviceAddress.pNext = serialisedInfo.pNext;
|
||||
serialisedInfo.pNext = &memoryDeviceAddress;
|
||||
|
||||
memFlags->flags |= VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR;
|
||||
}
|
||||
|
||||
{
|
||||
CACHE_THREAD_SERIALISER();
|
||||
|
||||
SCOPED_SERIALISE_CHUNK(VulkanChunk::vkAllocateMemory);
|
||||
Serialise_vkAllocateMemory(ser, device, &serialisedInfo, NULL, pMemory);
|
||||
|
||||
chunk = scope.Get();
|
||||
}
|
||||
|
||||
record->AddChunk(chunk);
|
||||
|
||||
record->Length = info.allocationSize;
|
||||
@@ -1115,8 +1153,8 @@ VkResult WrappedVulkan::vkCreateBuffer(VkDevice device, const VkBufferCreateInfo
|
||||
|
||||
// If we're using this buffer for device addresses, ensure we force on capture replay bit.
|
||||
// We ensured the physical device can support this feature before whitelisting the extension.
|
||||
if(adjusted_info.usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT)
|
||||
adjusted_info.flags |= VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT;
|
||||
if(adjusted_info.usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR)
|
||||
adjusted_info.flags |= VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR;
|
||||
|
||||
byte *tempMem = GetTempMemory(GetNextPatchSize(adjusted_info.pNext));
|
||||
|
||||
@@ -1135,34 +1173,56 @@ VkResult WrappedVulkan::vkCreateBuffer(VkDevice device, const VkBufferCreateInfo
|
||||
Chunk *chunk = NULL;
|
||||
|
||||
VkBufferCreateInfo serialisedCreateInfo = *pCreateInfo;
|
||||
VkBufferDeviceAddressCreateInfoEXT bufferDeviceAddress = {
|
||||
VkBufferDeviceAddressCreateInfoEXT bufferDeviceAddressEXT = {
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT,
|
||||
};
|
||||
VkBufferOpaqueCaptureAddressCreateInfoKHR bufferDeviceAddressKHR = {
|
||||
VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR,
|
||||
};
|
||||
|
||||
VkResourceRecord *record = GetResourceManager()->AddResourceRecord(*pBuffer);
|
||||
record->memSize = pCreateInfo->size;
|
||||
|
||||
// if we're using VK_EXT_buffer_device_address, we fetch the device address that's been
|
||||
// if we're using VK_[KHR|EXT]_buffer_device_address, we fetch the device address that's been
|
||||
// allocated and insert it into the next chain and patch the flags so that it replays
|
||||
// naturally.
|
||||
if(GetRecord(device)->instDevInfo->ext_EXT_buffer_device_address &&
|
||||
(pCreateInfo->usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT) != 0)
|
||||
if((pCreateInfo->usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR) != 0)
|
||||
{
|
||||
VkBufferDeviceAddressInfoEXT getInfo = {
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT, NULL, Unwrap(*pBuffer),
|
||||
VkBufferDeviceAddressInfoKHR getInfo = {
|
||||
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR, NULL, Unwrap(*pBuffer),
|
||||
};
|
||||
|
||||
bufferDeviceAddress.deviceAddress =
|
||||
ObjDisp(device)->GetBufferDeviceAddressEXT(Unwrap(device), &getInfo);
|
||||
if(GetExtensions(GetRecord(device)).ext_KHR_buffer_device_address)
|
||||
{
|
||||
bufferDeviceAddressKHR.opaqueCaptureAddress =
|
||||
ObjDisp(device)->GetBufferOpaqueCaptureAddressKHR(Unwrap(device), &getInfo);
|
||||
|
||||
RDCASSERT(bufferDeviceAddress.deviceAddress);
|
||||
// we explicitly DON'T assert on this, because some drivers will only need the device
|
||||
// address specified at allocate time.
|
||||
// RDCASSERT(bufferDeviceAddressKHR.opaqueCaptureAddress);
|
||||
|
||||
// push this struct onto the start of the chain
|
||||
bufferDeviceAddress.pNext = serialisedCreateInfo.pNext;
|
||||
serialisedCreateInfo.pNext = &bufferDeviceAddress;
|
||||
// push this struct onto the start of the chain
|
||||
bufferDeviceAddressKHR.pNext = serialisedCreateInfo.pNext;
|
||||
serialisedCreateInfo.pNext = &bufferDeviceAddressKHR;
|
||||
}
|
||||
else if(GetExtensions(GetRecord(device)).ext_EXT_buffer_device_address)
|
||||
{
|
||||
bufferDeviceAddressEXT.deviceAddress =
|
||||
ObjDisp(device)->GetBufferDeviceAddressEXT(Unwrap(device), &getInfo);
|
||||
|
||||
// tell the driver we're giving it a pre-allocated address to use
|
||||
serialisedCreateInfo.flags |= VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT;
|
||||
RDCASSERT(bufferDeviceAddressEXT.deviceAddress);
|
||||
|
||||
// push this struct onto the start of the chain
|
||||
bufferDeviceAddressEXT.pNext = serialisedCreateInfo.pNext;
|
||||
serialisedCreateInfo.pNext = &bufferDeviceAddressEXT;
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCERR("Device address bit specified but no device address extension enabled");
|
||||
}
|
||||
|
||||
// tell the driver on replay that we're giving it a pre-allocated address to use
|
||||
serialisedCreateInfo.flags |= VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR;
|
||||
|
||||
// this buffer must be forced to be in any captures, since we can't track when it's used by
|
||||
// address
|
||||
|
||||
Reference in New Issue
Block a user