Skip to content

[spv-in] Support (or ignore) SPV_KHR_non_semantic_info for use with profiling tools #7331

@LPGhatguy

Description

@LPGhatguy

Is your feature request related to a problem? Please describe.
I'm profiling my application with Nsight Graphics. Many of our shaders are written in HLSL and compiled to SPIR-V with dxc. Nsight recommends passing -fspv-debug=vulkan-with-source to dxc to enable SPV_KHR_non_semantic_info and get more detailed information.

However, wgpu gives me a panic:

In Device::create_shader_module
Shader '' parsing error: UnsupportedExtension("SPV_KHR_non_semantic_info")
unsupported extension SPV_KHR_non_semantic_info

Describe the solution you'd like
wgpu could ignore this extension without providing any additional features. That would enable me to profile my game without falling all the way back to SPIR-V passthrough.

Describe alternatives you've considered
I can enable SPIR-V passthrough which makes wgpu not worry so much about the SPIR-V. This does work, and it's pretty easy to toggle on/off in our engine!

One note is that when I enable SPIR-V passthrough, wgpu can no longer automatically find my entrypoint function and I've gotta name it manually.

Additional context
We're still on wgpu v23; apologies if this has been resolved in a later version but I did not find anything in the issue tracker!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions