Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PushConstant gets mistakenly recognized as binding #5693

Open
fknfilewalker opened this issue Nov 27, 2024 · 0 comments
Open

PushConstant gets mistakenly recognized as binding #5693

fknfilewalker opened this issue Nov 27, 2024 · 0 comments

Comments

@fknfilewalker
Copy link
Contributor

The following code, produces the following error

[[vk::binding(0, 0)]] RWTexture2D<float4> output;
[[vk::push_constant]] RaytracingAccelerationStructure tlas;

[shader("raygeneration")]
void rayGenMain()
{}
VUID-VkRayTracingPipelineCreateInfoKHR-layout-07988(ERROR / SPEC): msgNum: -859700687 - Validation Error: [ VUID-VkRayTracingPipelineCreateInfoKHR-layout-07988 ] Object 0: handle = 0x4fac1c0000000032, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0xa808d50000000033, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0xccc20231 | vkCreateRayTracingPipelinesKHR(): pCreateInfos[0].pStages[0] SPIR-V (VK_SHADER_STAGE_RAYGEN_BIT_KHR) uses descriptor [Set 0, Binding 1, variable "tlas"] (type VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR) but was not declared in the pipeline layout.
The Vulkan spec states: If a resource variables is declared in a shader, a descriptor slot in layout must match the shader stage (https://vulkan.lunarg.com/doc/view/1.3.296.0/windows/1.3-extensions/vkspec.html#VUID-VkRayTracingPipelineCreateInfoKHR-layout-07988)
    Objects: 2
        [0] 0x4fac1c0000000032, type: 15, name: NULL
        [1] 0xa808d50000000033, type: 17, name: NULL

For some reason the pushconstant is a descriptor binding (set 0, binding 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant