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

spv-out: configure source language in debug info #6256

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

kvark
Copy link
Member

@kvark kvark commented Sep 12, 2024

Connections
Resolves #6252

Description
Tools are sensitive to the kind of shader they get on the input. Setting UNKNOWN was confusing NSight.

Testing
Build with debug info, load into NSight.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@kvark kvark requested a review from a team as a code owner September 12, 2024 06:35
@kvark kvark force-pushed the spv-source-language branch 2 times, most recently from 20adc57 to bf56c6c Compare September 12, 2024 07:24
@kvark kvark requested a review from a team as a code owner September 12, 2024 07:24
@JMS55
Copy link
Contributor

JMS55 commented Sep 12, 2024

Does this mean we get the original WGSL source code when profiling shaders in NSight? (on the Vulkan backend of course)

@kvark
Copy link
Member Author

kvark commented Sep 13, 2024

Well, almost. It turns out that NSight doesn't accept WGSL right now. So the user would have to force GLSL there. That is more an issue with NSight than it is with wgpu though - hopefully they'll unblock it soon.
The goal of the PR is to make it configurable in Naga, I don't have strong preference on what wgpu should do with it.

@cwfitzgerald
Copy link
Member

I don't think there's any harm in lying that it's glsl, until someone complains as tooling is starting to support it

@jimblandy
Copy link
Member

I'd like to avoid TODO comments in the source code, because they're just not as good for tracking and prioritizing as filed issues. So I filed #6266 and changed the TODO comment to refer to that.

Copy link
Member

@jimblandy jimblandy left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@jimblandy jimblandy merged commit eb18854 into trunk Sep 13, 2024
52 checks passed
@jimblandy jimblandy deleted the spv-source-language branch September 13, 2024 18:37
@kvark
Copy link
Member Author

kvark commented Sep 15, 2024

Thanks Jim!

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

Successfully merging this pull request may close these issues.

4 participants