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

Encode testing information in the comment/header for HLSL #4346

Open
kvark opened this issue Jul 17, 2021 · 0 comments
Open

Encode testing information in the comment/header for HLSL #4346

kvark opened this issue Jul 17, 2021 · 0 comments
Labels
area: naga back-end Outputs of naga shader conversion area: tests Improvements or issues with our test suite kind: refactor Making existing function faster or nicer lang: HLSL D3D Shading Language naga Shader Translator

Comments

@kvark
Copy link
Member

kvark commented Jul 17, 2021

In gfx-rs/naga#972 @Indish laid out the infrastructure for validating HLSL. It uses special "*.config" files on the sideline of the HLSL output. It was necessary, I'm happy with the way it works.

Now I had a similar issue with MSL where I needed to tell the validator, which language version to validate against. And I decided to try to encode this just as a comment in the file header. See - gfx-rs/naga#1101 . I think this works very well, and we should consider doing the same for HLSL. Here is what we'll get in return:

  • no need to have separate "*.config" files
  • no redundancy: the backend already knows what to put into this comment, no human intervention needed
@kvark kvark added kind: refactor Making existing function faster or nicer area: naga back-end Outputs of naga shader conversion labels Jul 17, 2021
@cwfitzgerald cwfitzgerald added the lang: HLSL D3D Shading Language label Oct 25, 2023
@cwfitzgerald cwfitzgerald transferred this issue from gfx-rs/naga Oct 25, 2023
@cwfitzgerald cwfitzgerald added the naga Shader Translator label Oct 25, 2023
@teoxoy teoxoy added the area: tests Improvements or issues with our test suite label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: naga back-end Outputs of naga shader conversion area: tests Improvements or issues with our test suite kind: refactor Making existing function faster or nicer lang: HLSL D3D Shading Language naga Shader Translator
Projects
None yet
Development

No branches or pull requests

3 participants