-
Notifications
You must be signed in to change notification settings - Fork 422
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
RayTraversalPrimitiveCullingKHR
capability not allowed in ray _query_ shaders
#4278
Comments
This is a spec bug (Vulkan-Docs) because all the validation layers stuff (and the table in the spec) are generated from the <spirvcapability name="RayTraversalPrimitiveCullingKHR">
<enable struct="VkPhysicalDeviceRayTracingPipelineFeaturesKHR" feature="rayTraversalPrimitiveCulling" requires="VK_KHR_ray_tracing_pipeline"/>
</spirvcapability> I do agree looking at this now, it seems to be a mistake that there is no way to enable Also it does say in the SPV_KHR_ray_query spec
|
@sjfricke Thanks for confirming that it should indeed be usable on Will file this upstream :) |
RayTraversalPrimitiveCullingKHR is optional for VK_KHR_ray_tracing_pipeline, but required for VK_KHR_ray_query, which is why there is no feature flag in VK_KHR_ray_query. I think this bug came about when we tried to represent all the capabilities in the XML. |
then the simple fix is just to add a line to the XML <spirvcapability name="RayTraversalPrimitiveCullingKHR">
<enable struct="VkPhysicalDeviceRayTracingPipelineFeaturesKHR" feature="rayTraversalPrimitiveCulling" requires="VK_KHR_ray_tracing_pipeline"/>
+ <enable extension="VK_KHR_ray_query"/>
</spirvcapability> and everything will just work (trivial fix, can make PR or if @dgkoch wants to do it internally if it is faster) |
I can do it |
@sjfricke Actually we need the rayQuery feature to be enabled as well, right? |
@dgkoch Isn't the same implied for |
yes so it would be <spirvcapability name="RayTraversalPrimitiveCullingKHR">
<enable struct="VkPhysicalDeviceRayTracingPipelineFeaturesKHR" feature="rayTraversalPrimitiveCulling" requires="VK_KHR_ray_tracing_pipeline"/>
+ <enable struct="VkPhysicalDeviceRayQueryFeaturesKHR" feature="rayQuery" requires="VK_KHR_ray_query"/>
</spirvcapability> |
Just wondering, if |
I don't think we technically have anything that explicitly says that |
Spec fix released in VK 1.3.221 |
Pulled in and should be good now https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/4314/files#diff-7d48a2b188a782c63658a6716d3b99ded72d38c774bbc647272646552d4e198e @ncesario-lunarg we can close this issue now |
Thanks a lot! I'll test this out in the coming days. |
Describe the Issue
When using a shader with ray queries, that have
SkipAABBsKHR
set (RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES
in HLSL) and itsRayTraversalPrimitiveCullingKHR
emitted in SPIR-V, the following error appears:Note that this appears when exclusively using
VK_KHR_ray_query
and not enabling/havingVK_KHR_ray_tracing_pipeline
- hence not enabling the flag inVkPhysicalDeviceRayTracingPipelineFeaturesKHR
.It appears the spec and this validation layer only have a Vulkan feature for Ray Tracing pipelines, but not for Ray Query shaders?
A possible workaround is passing
VkPhysicalDeviceRayTracingPipelineFeaturesKHR
regardless of theVK_KHR_ray_tracing_pipeline
feature, but that seems wrong and I'm surprised the validation layer doesn't complain about feature structs being used without the appropriate extension being enabled.Valid Usage ID
VUID-VkShaderModuleCreateInfo-pCode-01091
Environment
Additional context
The text was updated successfully, but these errors were encountered: