-
Notifications
You must be signed in to change notification settings - Fork 571
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
Bindings don't get picked up properly #1718
Comments
Sorry for late reply, was on holiday. |
The SPIR-V is invalid. In SPIR-V 1.4 and later, global active variables (not just stage IO) must be part of the OpEntryPoint list, otherwise, they are filtered out. |
@HansKristian-Work I'm not entirely sure what the problem is with the SPIR-V binary? It's not a 1.4 binary (DXC doesn't generate SPIRV 1.4 iirc)? Does spirv-cross only support the latest SPIR-V version? |
The SPIR-V you linked is 1.5:
SPIRV-Cross supports all SPIR-V versions, but the semantics in SPIR-V 1.4 and up changed. |
I guess the problem is that spirv-as targets 1.5 by default, unless overridden with --target-env. |
This is a shader I'm trying to round-trip through DXC & spirv-cross as an experiment (ultimately DXC will be replaced by rust-gpu instead).
Invoked with:
dxc -Tcs_6_5 -spirv test.hlsl -spirv > test.spirv
I'd assemble the
test.spirv
as usual withspirv-as test.spirv
Which leads to the
out.spv
file (attached) - I feed that into spirv-cross like so:out.zip
spirv-cross --dump-resources --hlsl --shader-model 65 out.spv
Which leads to the following hlsl output:
This fails to compile because all of the bindings are missing.
The text was updated successfully, but these errors were encountered: