Skip to content

Commit 276104c

Browse files
committed
Add support for VK_KHR_maintenance5
1 parent 1195487 commit 276104c

32 files changed

+1099
-218
lines changed

qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,7 @@ void VulkanPipelineStateViewer::setState()
19111911
BufferDescription *buf = m_Ctx.GetBuffer(state.inputAssembly.indexBuffer.resourceId);
19121912

19131913
if(buf)
1914-
length = buf->length;
1914+
length = qMin(state.inputAssembly.indexBuffer.byteSize, buf->length);
19151915

19161916
RDTreeWidgetItem *node = new RDTreeWidgetItem(
19171917
{tr("Index"), state.inputAssembly.indexBuffer.resourceId, tr("Index"), lit("-"),
@@ -3494,7 +3494,7 @@ void VulkanPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const VKPipe::
34943494
if(ib)
34953495
{
34963496
name = m_Ctx.GetResourceName(ia.indexBuffer.resourceId);
3497-
length = ib->length;
3497+
length = qMin(ib->length, ia.indexBuffer.byteSize);
34983498
}
34993499

35003500
QString ifmt = lit("UNKNOWN");

renderdoc/api/replay/pipestate.inl

+1-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ BoundVBuffer PipeState::GetIBuffer() const
515515
ret.resourceId = m_Vulkan->inputAssembly.indexBuffer.resourceId;
516516
ret.byteOffset = m_Vulkan->inputAssembly.indexBuffer.byteOffset;
517517
ret.byteStride = m_Vulkan->inputAssembly.indexBuffer.byteStride;
518-
ret.byteSize = ~0ULL;
518+
ret.byteSize = m_Vulkan->inputAssembly.indexBuffer.byteSize;
519519
}
520520
}
521521

renderdoc/api/replay/vk_pipestate.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ When not using pipeline libraries, this will be identical to :data:`pipelinePreR
126126
)");
127127
ResourceId pipelineFragmentLayoutResourceId;
128128
DOCUMENT("The flags used to create the pipeline object.");
129-
uint32_t flags = 0;
129+
uint64_t flags = 0;
130130

131131
DOCUMENT(R"(The bound descriptor sets.
132132
@@ -149,6 +149,9 @@ struct IndexBuffer
149149
DOCUMENT("The byte offset from the start of the buffer to the beginning of the index data.");
150150
uint64_t byteOffset = 0;
151151

152+
DOCUMENT("The byte size from the start offset to the end of the index data.");
153+
uint64_t byteSize = 0;
154+
152155
DOCUMENT(R"(The number of bytes for each index in the index buffer. Typically 2 or 4 bytes but
153156
it can be 0 if no index buffer is bound.
154157
)");

renderdoc/driver/vulkan/extension_support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ Maintainers can update this file by updating vk.xml in this folder and running `
179179
* `VK_KHR_maintenance2`
180180
* `VK_KHR_maintenance3`
181181
* `VK_KHR_maintenance4`
182+
* `VK_KHR_maintenance5`
182183
* `VK_KHR_multiview`
183184
* `VK_KHR_performance_query`
184185
* `VK_KHR_pipeline_executable_properties`
@@ -255,7 +256,6 @@ KHR extensions will definitely be implemented at some point, though KHR extensio
255256
## KHR Extensions
256257

257258
* `VK_KHR_cooperative_matrix`
258-
* `VK_KHR_maintenance5`
259259
* `VK_KHR_maintenance6`
260260
* `VK_KHR_maintenance7`
261261
* `VK_KHR_maintenance8`

renderdoc/driver/vulkan/vk_common.h

+82-2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@
7373
#define VkAccessFlagBits2 VkAccessFlagBits2_VkFlags64_typedef
7474
#define VkPipelineStageFlagBits2 VkPipelineStageFlagBits2_VkFlags64_typedef
7575
#define VkFormatFeatureFlagBits2 VkFormatFeatureFlagBits2_VkFlags64_typedef
76+
#define VkBufferUsageFlagBits2 VkBufferUsageFlagBits2_VkFlags64_typedef
77+
#define VkPipelineCreateFlagBits2 VkPipelineCreateFlagBits2_VkFlags64_typedef
7678

7779
#include "core/core.h"
7880
#include "core/resource_manager.h"
@@ -84,6 +86,8 @@
8486
#undef VkAccessFlagBits2
8587
#undef VkPipelineStageFlagBits2
8688
#undef VkFormatFeatureFlagBits2
89+
#undef VkBufferUsageFlagBits2
90+
#undef VkPipelineCreateFlagBits2
8791

8892
#undef Bool
8993
#undef None
@@ -129,6 +133,54 @@ int SampleIndex(VkSampleCountFlagBits countFlag);
129133
int StageIndex(VkShaderStageFlagBits stageFlag);
130134
VkShaderStageFlags ShaderMaskFromIndex(size_t index);
131135

136+
// Generic getter/setter helpers to handle optional 64 flag structs in the pNext chain
137+
template <typename ParentStruct>
138+
uint64_t GetBufferUsageFlags(const ParentStruct *info)
139+
{
140+
const VkBufferUsageFlags2CreateInfo *usage2 = (const VkBufferUsageFlags2CreateInfo *)FindNextStruct(
141+
info, VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO);
142+
if(usage2)
143+
return usage2->usage;
144+
return info->usage;
145+
}
146+
147+
template <typename ParentStruct>
148+
void SetBufferUsageFlags(ParentStruct *info, uint64_t usage)
149+
{
150+
VkBufferUsageFlags2CreateInfo *usage2 = (VkBufferUsageFlags2CreateInfo *)FindNextStruct(
151+
info, VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO);
152+
if(usage2)
153+
{
154+
usage2->usage = usage;
155+
return;
156+
}
157+
info->usage = (VkBufferUsageFlags)usage;
158+
}
159+
160+
template <typename ParentStruct>
161+
uint64_t GetPipelineCreateFlags(const ParentStruct *info)
162+
{
163+
const VkPipelineCreateFlags2CreateInfo *flags2 =
164+
(const VkPipelineCreateFlags2CreateInfo *)FindNextStruct(
165+
info, VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO);
166+
if(flags2)
167+
return flags2->flags;
168+
return info->flags;
169+
}
170+
171+
template <typename ParentStruct>
172+
void SetPipelineCreateFlags(ParentStruct *info, uint64_t flags)
173+
{
174+
VkPipelineCreateFlags2CreateInfo *flags2 = (VkPipelineCreateFlags2CreateInfo *)FindNextStruct(
175+
info, VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO);
176+
if(flags2)
177+
{
178+
flags2->flags = flags;
179+
return;
180+
}
181+
info->flags = (VkPipelineCreateFlags)flags;
182+
}
183+
132184
struct PackedWindowHandle
133185
{
134186
PackedWindowHandle(WindowingSystem s, void *h) : system(s), handle(h) {}
@@ -1150,6 +1202,7 @@ enum class VulkanChunk : uint32_t
11501202
vkCmdSetRenderingInputAttachmentIndicesKHR,
11511203
vkCmdTraceRaysIndirect2KHR,
11521204
vkCmdWriteAccelerationStructuresPropertiesKHR,
1205+
vkCmdBindIndexBuffer2KHR,
11531206
Max,
11541207
};
11551208

@@ -1233,6 +1286,7 @@ DECLARE_REFLECTION_STRUCT(VkBufferMemoryBarrier);
12331286
DECLARE_REFLECTION_STRUCT(VkBufferMemoryBarrier2);
12341287
DECLARE_REFLECTION_STRUCT(VkBufferMemoryRequirementsInfo2);
12351288
DECLARE_REFLECTION_STRUCT(VkBufferOpaqueCaptureAddressCreateInfo);
1289+
DECLARE_REFLECTION_STRUCT(VkBufferUsageFlags2CreateInfo);
12361290
DECLARE_REFLECTION_STRUCT(VkBufferViewCreateInfo);
12371291
DECLARE_REFLECTION_STRUCT(VkCalibratedTimestampInfoKHR);
12381292
DECLARE_REFLECTION_STRUCT(VkCommandBufferAllocateInfo);
@@ -1286,6 +1340,7 @@ DECLARE_REFLECTION_STRUCT(VkDeviceGroupRenderPassBeginInfo);
12861340
DECLARE_REFLECTION_STRUCT(VkDeviceGroupSubmitInfo);
12871341
DECLARE_REFLECTION_STRUCT(VkDeviceGroupSwapchainCreateInfoKHR);
12881342
DECLARE_REFLECTION_STRUCT(VkDeviceImageMemoryRequirements);
1343+
DECLARE_REFLECTION_STRUCT(VkDeviceImageSubresourceInfo);
12891344
DECLARE_REFLECTION_STRUCT(VkDeviceMemoryOpaqueCaptureAddressInfo);
12901345
DECLARE_REFLECTION_STRUCT(VkDeviceMemoryOverallocationCreateInfoAMD);
12911346
DECLARE_REFLECTION_STRUCT(VkDevicePrivateDataCreateInfo);
@@ -1337,6 +1392,7 @@ DECLARE_REFLECTION_STRUCT(VkImagePlaneMemoryRequirementsInfo);
13371392
DECLARE_REFLECTION_STRUCT(VkImageResolve2);
13381393
DECLARE_REFLECTION_STRUCT(VkImageSparseMemoryRequirementsInfo2);
13391394
DECLARE_REFLECTION_STRUCT(VkImageStencilUsageCreateInfo);
1395+
DECLARE_REFLECTION_STRUCT(VkImageSubresource2);
13401396
DECLARE_REFLECTION_STRUCT(VkImageSwapchainCreateInfoKHR);
13411397
DECLARE_REFLECTION_STRUCT(VkImageViewASTCDecodeModeEXT);
13421398
DECLARE_REFLECTION_STRUCT(VkImageViewCreateInfo);
@@ -1438,6 +1494,8 @@ DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceLineRasterizationProperties);
14381494
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance3Properties);
14391495
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance4Features);
14401496
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance4Properties);
1497+
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance5Features);
1498+
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance5Properties);
14411499
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMemoryBudgetPropertiesEXT);
14421500
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMemoryPriorityFeaturesEXT);
14431501
DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMemoryProperties2);
@@ -1540,6 +1598,7 @@ DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures)
15401598
DECLARE_REFLECTION_STRUCT(VkPipelineCacheCreateInfo);
15411599
DECLARE_REFLECTION_STRUCT(VkPipelineColorBlendStateCreateInfo);
15421600
DECLARE_REFLECTION_STRUCT(VkPipelineColorWriteCreateInfoEXT);
1601+
DECLARE_REFLECTION_STRUCT(VkPipelineCreateFlags2CreateInfo);
15431602
DECLARE_REFLECTION_STRUCT(VkPipelineCreationFeedbackCreateInfo);
15441603
DECLARE_REFLECTION_STRUCT(VkPipelineDepthStencilStateCreateInfo);
15451604
DECLARE_REFLECTION_STRUCT(VkPipelineDiscardRectangleStateCreateInfoEXT);
@@ -1586,6 +1645,7 @@ DECLARE_REFLECTION_STRUCT(VkRayTracingPipelineInterfaceCreateInfoKHR);
15861645
DECLARE_REFLECTION_STRUCT(VkRayTracingShaderGroupCreateInfoKHR);
15871646
DECLARE_REFLECTION_STRUCT(VkRefreshCycleDurationGOOGLE);
15881647
DECLARE_REFLECTION_STRUCT(VkReleaseSwapchainImagesInfoEXT);
1648+
DECLARE_REFLECTION_STRUCT(VkRenderingAreaInfo);
15891649
DECLARE_REFLECTION_STRUCT(VkRenderingAttachmentInfo);
15901650
DECLARE_REFLECTION_STRUCT(VkRenderingAttachmentLocationInfo);
15911651
DECLARE_REFLECTION_STRUCT(VkRenderingFragmentDensityMapAttachmentInfoEXT);
@@ -1631,6 +1691,7 @@ DECLARE_REFLECTION_STRUCT(VkSubpassEndInfo);
16311691
DECLARE_REFLECTION_STRUCT(VkSubpassFragmentDensityMapOffsetEndInfoQCOM);
16321692
DECLARE_REFLECTION_STRUCT(VkSubpassResolvePerformanceQueryEXT);
16331693
DECLARE_REFLECTION_STRUCT(VkSubpassSampleLocationsEXT);
1694+
DECLARE_REFLECTION_STRUCT(VkSubresourceLayout2);
16341695
DECLARE_REFLECTION_STRUCT(VkSurfaceCapabilities2EXT);
16351696
DECLARE_REFLECTION_STRUCT(VkSurfaceCapabilities2KHR);
16361697
DECLARE_REFLECTION_STRUCT(VkSurfaceFormat2KHR);
@@ -1688,6 +1749,7 @@ DECLARE_DESERIALISE_TYPE(VkBufferMemoryBarrier);
16881749
DECLARE_DESERIALISE_TYPE(VkBufferMemoryBarrier2);
16891750
DECLARE_DESERIALISE_TYPE(VkBufferMemoryRequirementsInfo2);
16901751
DECLARE_DESERIALISE_TYPE(VkBufferOpaqueCaptureAddressCreateInfo);
1752+
DECLARE_DESERIALISE_TYPE(VkBufferUsageFlags2CreateInfo);
16911753
DECLARE_DESERIALISE_TYPE(VkBufferViewCreateInfo);
16921754
DECLARE_DESERIALISE_TYPE(VkCalibratedTimestampInfoKHR);
16931755
DECLARE_DESERIALISE_TYPE(VkCommandBufferAllocateInfo);
@@ -1741,6 +1803,7 @@ DECLARE_DESERIALISE_TYPE(VkDeviceGroupRenderPassBeginInfo);
17411803
DECLARE_DESERIALISE_TYPE(VkDeviceGroupSubmitInfo);
17421804
DECLARE_DESERIALISE_TYPE(VkDeviceGroupSwapchainCreateInfoKHR);
17431805
DECLARE_DESERIALISE_TYPE(VkDeviceImageMemoryRequirements);
1806+
DECLARE_DESERIALISE_TYPE(VkDeviceImageSubresourceInfo);
17441807
DECLARE_DESERIALISE_TYPE(VkDeviceMemoryOpaqueCaptureAddressInfo);
17451808
DECLARE_DESERIALISE_TYPE(VkDeviceMemoryOverallocationCreateInfoAMD);
17461809
DECLARE_DESERIALISE_TYPE(VkDevicePrivateDataCreateInfo);
@@ -1791,6 +1854,7 @@ DECLARE_DESERIALISE_TYPE(VkImagePlaneMemoryRequirementsInfo);
17911854
DECLARE_DESERIALISE_TYPE(VkImageResolve2);
17921855
DECLARE_DESERIALISE_TYPE(VkImageSparseMemoryRequirementsInfo2);
17931856
DECLARE_DESERIALISE_TYPE(VkImageStencilUsageCreateInfo);
1857+
DECLARE_DESERIALISE_TYPE(VkImageSubresource2);
17941858
DECLARE_DESERIALISE_TYPE(VkImageSwapchainCreateInfoKHR);
17951859
DECLARE_DESERIALISE_TYPE(VkImageViewASTCDecodeModeEXT);
17961860
DECLARE_DESERIALISE_TYPE(VkImageViewCreateInfo);
@@ -1889,6 +1953,8 @@ DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceLineRasterizationProperties);
18891953
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance3Properties);
18901954
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance4Features);
18911955
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance4Properties);
1956+
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance5Features);
1957+
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance5Properties);
18921958
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMemoryBudgetPropertiesEXT);
18931959
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMemoryPriorityFeaturesEXT);
18941960
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMemoryProperties2);
@@ -1974,8 +2040,8 @@ DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceTransformFeedbackPropertiesEXT);
19742040
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceUniformBufferStandardLayoutFeatures);
19752041
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVariablePointersFeatures);
19762042
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVertexAttributeDivisorFeatures);
1977-
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT);
19782043
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVertexAttributeDivisorProperties);
2044+
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT);
19792045
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT);
19802046
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVulkan11Features);
19812047
DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVulkan11Properties);
@@ -1991,6 +2057,7 @@ DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures);
19912057
DECLARE_DESERIALISE_TYPE(VkPipelineCacheCreateInfo);
19922058
DECLARE_DESERIALISE_TYPE(VkPipelineColorBlendStateCreateInfo);
19932059
DECLARE_DESERIALISE_TYPE(VkPipelineColorWriteCreateInfoEXT);
2060+
DECLARE_DESERIALISE_TYPE(VkPipelineCreateFlags2CreateInfo);
19942061
DECLARE_DESERIALISE_TYPE(VkPipelineCreationFeedbackCreateInfo);
19952062
DECLARE_DESERIALISE_TYPE(VkPipelineDepthStencilStateCreateInfo);
19962063
DECLARE_DESERIALISE_TYPE(VkPipelineDiscardRectangleStateCreateInfoEXT);
@@ -2035,12 +2102,13 @@ DECLARE_DESERIALISE_TYPE(VkRayTracingPipelineCreateInfoKHR);
20352102
DECLARE_DESERIALISE_TYPE(VkRayTracingPipelineInterfaceCreateInfoKHR);
20362103
DECLARE_DESERIALISE_TYPE(VkRayTracingShaderGroupCreateInfoKHR);
20372104
DECLARE_DESERIALISE_TYPE(VkReleaseSwapchainImagesInfoEXT);
2105+
DECLARE_DESERIALISE_TYPE(VkRenderingAreaInfo);
20382106
DECLARE_DESERIALISE_TYPE(VkRenderingAttachmentInfo);
20392107
DECLARE_DESERIALISE_TYPE(VkRenderingAttachmentLocationInfo);
20402108
DECLARE_DESERIALISE_TYPE(VkRenderingFragmentDensityMapAttachmentInfoEXT);
20412109
DECLARE_DESERIALISE_TYPE(VkRenderingFragmentShadingRateAttachmentInfoKHR);
2042-
DECLARE_DESERIALISE_TYPE(VkRenderingInputAttachmentIndexInfo);
20432110
DECLARE_DESERIALISE_TYPE(VkRenderingInfo);
2111+
DECLARE_DESERIALISE_TYPE(VkRenderingInputAttachmentIndexInfo);
20442112
DECLARE_DESERIALISE_TYPE(VkRenderPassAttachmentBeginInfo);
20452113
DECLARE_DESERIALISE_TYPE(VkRenderPassBeginInfo);
20462114
DECLARE_DESERIALISE_TYPE(VkRenderPassCreateInfo);
@@ -2079,6 +2147,7 @@ DECLARE_DESERIALISE_TYPE(VkSubpassEndInfo);
20792147
DECLARE_DESERIALISE_TYPE(VkSubpassFragmentDensityMapOffsetEndInfoQCOM);
20802148
DECLARE_DESERIALISE_TYPE(VkSubpassResolvePerformanceQueryEXT);
20812149
DECLARE_DESERIALISE_TYPE(VkSubpassSampleLocationsEXT);
2150+
DECLARE_DESERIALISE_TYPE(VkSubresourceLayout2);
20822151
DECLARE_DESERIALISE_TYPE(VkSurfaceCapabilities2EXT);
20832152
DECLARE_DESERIALISE_TYPE(VkSurfaceCapabilities2KHR);
20842153
DECLARE_DESERIALISE_TYPE(VkSurfaceFormat2KHR);
@@ -2183,6 +2252,7 @@ DECLARE_REFLECTION_STRUCT(VkStencilOpState);
21832252
DECLARE_REFLECTION_STRUCT(VkStridedDeviceAddressRegionKHR);
21842253
DECLARE_REFLECTION_STRUCT(VkSubpassDependency);
21852254
DECLARE_REFLECTION_STRUCT(VkSubpassDescription);
2255+
DECLARE_REFLECTION_STRUCT(VkSubresourceLayout);
21862256
DECLARE_REFLECTION_STRUCT(VkSurfaceCapabilitiesKHR);
21872257
DECLARE_REFLECTION_STRUCT(VkSurfaceFormatKHR);
21882258
DECLARE_REFLECTION_STRUCT(VkTransformMatrixKHR);
@@ -2281,6 +2351,14 @@ enum VkFormatFeatureFlagBits2 : uint64_t
22812351
{
22822352
};
22832353

2354+
enum VkBufferUsageFlagBits2 : uint64_t
2355+
{
2356+
};
2357+
2358+
enum VkPipelineCreateFlagBits2 : uint64_t
2359+
{
2360+
};
2361+
22842362
// enums
22852363

22862364
DECLARE_REFLECTION_ENUM(VkAccelerationStructureBuildTypeKHR);
@@ -2298,6 +2376,7 @@ DECLARE_REFLECTION_ENUM(VkBlendOp);
22982376
DECLARE_REFLECTION_ENUM(VkBorderColor);
22992377
DECLARE_REFLECTION_ENUM(VkBufferCreateFlagBits);
23002378
DECLARE_REFLECTION_ENUM(VkBufferUsageFlagBits);
2379+
DECLARE_REFLECTION_ENUM(VkBufferUsageFlagBits2);
23012380
DECLARE_REFLECTION_ENUM(VkBuildAccelerationStructureFlagBitsKHR);
23022381
DECLARE_REFLECTION_ENUM(VkBuildAccelerationStructureModeKHR);
23032382
DECLARE_REFLECTION_ENUM(VkChromaLocation);
@@ -2379,6 +2458,7 @@ DECLARE_REFLECTION_ENUM(VkPipelineBindPoint);
23792458
DECLARE_REFLECTION_ENUM(VkPipelineCacheCreateFlagBits);
23802459
DECLARE_REFLECTION_ENUM(VkPipelineColorBlendStateCreateFlagBits);
23812460
DECLARE_REFLECTION_ENUM(VkPipelineCreateFlagBits);
2461+
DECLARE_REFLECTION_ENUM(VkPipelineCreateFlagBits2);
23822462
DECLARE_REFLECTION_ENUM(VkPipelineCreationFeedbackFlagBits);
23832463
DECLARE_REFLECTION_ENUM(VkPipelineDepthStencilStateCreateFlagBits);
23842464
DECLARE_REFLECTION_ENUM(VkPipelineExecutableStatisticFormatKHR);

renderdoc/driver/vulkan/vk_core.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,10 @@ static const VkExtensionProperties supportedExtensions[] = {
16261626
VK_KHR_MAINTENANCE_4_EXTENSION_NAME,
16271627
VK_KHR_MAINTENANCE_4_SPEC_VERSION,
16281628
},
1629+
{
1630+
VK_KHR_MAINTENANCE_5_EXTENSION_NAME,
1631+
VK_KHR_MAINTENANCE_5_SPEC_VERSION,
1632+
},
16291633
{
16301634
VK_KHR_MULTIVIEW_EXTENSION_NAME,
16311635
VK_KHR_MULTIVIEW_SPEC_VERSION,
@@ -4365,6 +4369,9 @@ bool WrappedVulkan::ProcessChunk(ReadSerialiser &ser, VulkanChunk chunk)
43654369
case VulkanChunk::vkCmdWriteAccelerationStructuresPropertiesKHR:
43664370
return Serialise_vkCmdWriteAccelerationStructuresPropertiesKHR(
43674371
ser, VK_NULL_HANDLE, 0, NULL, VK_QUERY_TYPE_MAX_ENUM, VK_NULL_HANDLE, 0);
4372+
case VulkanChunk::vkCmdBindIndexBuffer2KHR:
4373+
return Serialise_vkCmdBindIndexBuffer2KHR(ser, VK_NULL_HANDLE, VK_NULL_HANDLE, 0, 0,
4374+
VK_INDEX_TYPE_MAX_ENUM);
43684375

43694376
// chunks that are reserved but not yet serialised
43704377
case VulkanChunk::vkResetCommandPool:

renderdoc/driver/vulkan/vk_core.h

+15
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,7 @@ class WrappedVulkan : public IFrameCapturer
10241024
VkSampleCountFlagBits samples);
10251025
void PatchImageViewUsage(VkImageViewUsageCreateInfo *usage, VkFormat imgFormat,
10261026
VkSampleCountFlagBits samples);
1027+
void PatchImageCreateInfo(VkImageCreateInfo *pInfo, VkFormat *newViewFormats);
10271028

10281029
VkIndirectPatchData FetchIndirectData(VkIndirectPatchType type, VkCommandBuffer commandBuffer,
10291030
VkBuffer dataBuffer, VkDeviceSize dataOffset, uint32_t count,
@@ -3028,4 +3029,18 @@ class WrappedVulkan : public IFrameCapturer
30283029
// VK_KHR_ray_tracing_maintenance1
30293030
IMPLEMENT_FUNCTION_SERIALISED(void, vkCmdTraceRaysIndirect2KHR, VkCommandBuffer commandBuffer,
30303031
VkDeviceAddress indirectDeviceAddress);
3032+
3033+
// VK_KHR_maintenance5
3034+
IMPLEMENT_FUNCTION_SERIALISED(void, vkCmdBindIndexBuffer2KHR, VkCommandBuffer commandBuffer,
3035+
VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size,
3036+
VkIndexType indexType);
3037+
void vkGetDeviceImageSubresourceLayoutKHR(VkDevice device,
3038+
const VkDeviceImageSubresourceInfo *pInfo,
3039+
VkSubresourceLayout2 *pLayout);
3040+
void vkGetImageSubresourceLayout2KHR(VkDevice device, VkImage image,
3041+
const VkImageSubresource2 *pSubresource,
3042+
VkSubresourceLayout2 *pLayout);
3043+
void vkGetRenderingAreaGranularityKHR(VkDevice device,
3044+
const VkRenderingAreaInfo *pRenderingAreaInfo,
3045+
VkExtent2D *pGranularity);
30313046
};

0 commit comments

Comments
 (0)