Replies: 1 comment 2 replies
-
That looks like you're binding the view dependent state descriptor set (lights and shadows etc.) to your new slot instead of an instance of your new descriptor set. Get rid of the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writing a headless test program based on the example vsgheadless.cpp , and I'm trying to add my own uniform to the shaders, but when doing so I get Vulkan validation errors, and I don't get valid values from the uniform.
Here's what I did. I added a new uniform Foo to the shaderset by the following addition to the shader sources:
On the C++ side I then create a shaderset and try to add the
Foo
uniform binding through the following pseudo code:But when running the resulting programs the uniform isn't initialized and when running with Vulkan validation turned on I get the following errors:
The Vulkan spec states: If a resource variables is declared in a shader, a descriptor slot in layout must match the shader stage (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.ht
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://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIn
What did I do wrong? How do I declare the uniform in pipeline layout as reported by the validation layers?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions