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

[SPIR-V] Potential regression reports VUID-StandaloneSpirv-OpTypeImage-06924 #7063

Closed
artem-lunarg opened this issue Jan 13, 2025 · 3 comments
Assignees
Labels
bug Bug, regression, crash spirv Work related to SPIR-V

Comments

@artem-lunarg
Copy link

Here's a shader that works with DXC 1.8.2407 but ToT generates VUID-StandaloneSpirv-OpTypeImage-06924 (select DXC (trunk) in godbolt to get error message):
https://godbolt.org/z/Ph4WofKbT

fatal error: generated SPIR-V is invalid: [VUID-StandaloneSpirv-OpTypeImage-06924] Cannot store to OpTypeImage, OpTypeSampler, OpTypeSampledImage, or OpTypeAccelerationStructureKHR objects
OpStore %144 %269

The shader does not write to any of the resources mentioned in the error message. It samples image (READ) and traces ray against acceleration structure.

I found this issue by testing Vulkan SDK. DXC included in the Vulkan SDK 1.3.296 does not have this issue. But the ongoing SDK version is going to use the build based on this commit d39324e, and it generates the error.

@artem-lunarg artem-lunarg added bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V labels Jan 13, 2025
@s-perron
Copy link
Collaborator

I'll look into this right now. I don't know how easy it will be to fix. I don't know if we should think of this as a regression or not.

The change that caused the "problem" is when we upgraded the submodule to include KhronosGroup/SPIRV-Tools#5368. Before we were silently generating invalid spir-v. From my perspective, this is not a regression, but something that should be fixed.

I'll try to look into why we are generating a store of a resource handle. In general, we generate lots of them, and expect optimizations to be able to remove them. No guarantees we will be able to remove them in this case. I have not yet looked at the details of the shader.

@s-perron s-perron removed the needs-triage Awaiting triage label Jan 14, 2025
@s-perron s-perron added this to the Next+1 Release milestone Jan 14, 2025
@s-perron s-perron self-assigned this Jan 14, 2025
s-perron added a commit to s-perron/SPIRV-Tools that referenced this issue Jan 14, 2025
When adding SPV_KHR_ray_tracing to the allow lists, we missed the list
in local-single-store-elim. Adding it now.

microsoft/DirectXShaderCompiler#7063
@s-perron s-perron moved this from New to In review in HLSL Roadmap Jan 14, 2025
@damyanp damyanp moved this to For Google in HLSL Triage Jan 14, 2025
s-perron added a commit to KhronosGroup/SPIRV-Tools that referenced this issue Jan 15, 2025
When adding SPV_KHR_ray_tracing to the allow lists, we missed the list
in local-single-store-elim. Adding it now.

microsoft/DirectXShaderCompiler#7063
@s-perron
Copy link
Collaborator

This will be fixed the next time spirv-tools is updated.

@artem-lunarg
Copy link
Author

Thank you!

@github-project-automation github-project-automation bot moved this from In review to Done in HLSL Roadmap Jan 22, 2025
@github-project-automation github-project-automation bot moved this from For Google to Triaged in HLSL Triage Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash spirv Work related to SPIR-V
Projects
Status: Done
Status: Triaged
Development

No branches or pull requests

2 participants