Files
Marcin Hajder 1e9f2f6aa2 Fix test_vulkan_interop_buffer validation errors for missing vkUpdateDescriptorSets (#2606)
Fixes vulkan validation layer error:

Vulkan validation layer: Validation Error: [
VUID-vkCmdDispatch-None-08114 ] Object 0: handle = 0xb9181f0000000029,
type = VK_OBJECT_TYPE_DESCRIPTOR_SET; | MessageID = 0x30b6e267 |
vkCmdDispatch(): the descriptor VkDescriptorSet 0xb9181f0000000029[]
[Set 0, Binding 1, Index 1, variable "bufferPtrList"] is being used in
dispatch but has never been updated via vkUpdateDescriptorSets() or a
similar call. The Vulkan spec states: Descriptors in each bound
descriptor set, specified via vkCmdBindDescriptorSets, must be valid as
described by descriptor validity if they are statically used by the
VkPipeline bound to the pipeline bind point used by this command and the
bound VkPipeline was not created with
VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
(https://vulkan.lunarg.com/doc/view/1.4.304.0/windows/1.4-extensions/vkspec.html#VUID-vkCmdDispatch-None-08114)
2026-03-03 08:39:56 -08:00

28 lines
839 B
Plaintext

#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int8 : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int32 : enable
layout(constant_id = 0) const uint MAX_BUFFERS = 5;
layout(binding = 0) buffer Params
{
uint32_t numBuffers;
uint32_t bufferSize;
uint32_t interBufferOffset;
};
layout(binding = 1) buffer Buffer
{
uint8_t ptr[];
} bufferPtrList[MAX_BUFFERS];
layout(local_size_x = 128) in;
void main() {
for (uint32_t bufIdx = 0; bufIdx < numBuffers; bufIdx++) {
uint32_t ptrIdx = gl_GlobalInvocationID.x;
uint32_t limit = bufferSize;
while (ptrIdx < limit) {
bufferPtrList[bufIdx].ptr[ptrIdx]++;
ptrIdx += (gl_NumWorkGroups.x * gl_WorkGroupSize.x);
}
}
}