Skip to content

lower spirv ray query type to opaque debug type#7139

Merged
s-perron merged 4 commits into
microsoft:mainfrom
ChristianReinbold:spv_debug_ray_queries
Nov 5, 2025
Merged

lower spirv ray query type to opaque debug type#7139
s-perron merged 4 commits into
microsoft:mainfrom
ChristianReinbold:spv_debug_ray_queries

Conversation

@ChristianReinbold
Copy link
Copy Markdown
Contributor

Pull request for Issue #7033. It is still lacking a test though. If you can give me a quick pointer to a test directory where I can reformulate my reproducer as a test, I will add it as well.

Copy link
Copy Markdown
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing. This is a big help. The change look go to me.

You can add a test to https://github.com/microsoft/DirectXShaderCompiler/tree/20950d662f4d24850d7edfe1e647f6749d5c13b3/tools/clang/test/CodeGenSPIRV.

You can see examples in that directory. You'll want to add your hlsl source file with a RUN line at the top, and at least one CHECK line to look for code you expect to see.

You can run the tests by running:

ninja check-clang-codegenspirv

@ChristianReinbold
Copy link
Copy Markdown
Contributor Author

ChristianReinbold commented Feb 13, 2025

I am not building with ninja right now, but have a visual studio solution. Right now I am trying to launch tests via:

hcttest file-check "src\tools\clang\test\CodeGenSPIRV\attribute.location.lib.hlsl"

but it fails at the disassembly stage due to an invalid bitcode signature. Note that the compilation process seems to succeed. Whatever I am trying to do in order to make tests work, I seem to be completely on the wrong track here. That blocks me right now. No idea where to continue the investigation.

@s-perron
Copy link
Copy Markdown
Collaborator

Sorry, I did not get back to you. Can run the tests by building the check-clang-codegenspirv target. Look for that target in visual studio.

@ChristianReinbold
Copy link
Copy Markdown
Contributor Author

Sorry, I did not get back to you.

I am sorry for keeping you waiting so long. I had a large shift of priorities in work and then I forgot about this MR. I added the reproducer from the issue as a test and checked that it fails without the proposed change.

I do not remember what I tried with hcttest back then. Building with plain cmake/ninja and running the target as proposed worked like a charm now. Thanks for your hint!

Copy link
Copy Markdown
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. You just need to add more to the test.

Comment thread tools/clang/test/CodeGenSPIRV/rayquery_debug.hlsl Outdated
Co-authored-by: Steven Perron <stevenperron@google.com>
@s-perron
Copy link
Copy Markdown
Collaborator

s-perron commented Nov 5, 2025

/AzurePiplines run

@s-perron s-perron enabled auto-merge (squash) November 5, 2025 11:31
@s-perron
Copy link
Copy Markdown
Collaborator

s-perron commented Nov 5, 2025

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@s-perron s-perron merged commit 61de741 into microsoft:main Nov 5, 2025
12 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Nov 5, 2025
@ChristianReinbold ChristianReinbold deleted the spv_debug_ray_queries branch May 12, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants