Skip to content

[SPIR-V] "generated SPIR-V is invalid: Number of image operand ids doesn't correspond to the bit mask" #7174

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

Open
grantmulholland opened this issue Mar 4, 2025 · 7 comments
Labels
bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V

Comments

@grantmulholland
Copy link

Description
I seem to have run into an issue with DXC that I do not understand.

Environment

  • DXC version dxcompiler.dll: 1.6 - 1.6.2112.16 (e8295973c); dxil.dll: 1.6(101.6.2112.13)
  • Host Operating System Microsoft Windows Version 24H2 (OS Build 26100.3194)
  • Host Machine: Microsoft Surface Pro 11 with Qualcomm Snapdragon X Plus SoC

Steps to Reproduce
Attempt to build hedge-dev/UnleashedRecomp with submodule at tools/XenonRecomp pointing to IsaacMarovitz/XenonRecomp:simde (for hedge-dev/XenonRecomp#22 in case repo gets nuked after merge)

Actual Behavior
It gets very angry.
PowerShell Transcript of manually running relevant build step

Image

@grantmulholland grantmulholland added bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V labels Mar 4, 2025
@s-perron
Copy link
Collaborator

s-perron commented Mar 5, 2025

Sorry I don't have enough to go on for this error. Are you able to point the HLSL file being compiled? If not, you might need to talk to the maintainers of the other repos you mentioned to help debug the issue.

You are also using a very old version of DXC (Dec 2021). Could you try the latest release to see if that fixes the problem?

@grantmulholland
Copy link
Author

Correction for DXC version: It's acquired from vcpkg, and the DLL I've located shows the "product version" as 1.8.2407.7 (416fab6b5). I'm working at getting the shader code out of it now.

@grantmulholland
Copy link
Author

This should be the first shader that failed: failed0.hlsl.txt
I apologize for the likely lack of legibility; This was generated by the previously mentioned XenosRecomp program.

@s-perron
Copy link
Collaborator

I cannot easily reproduce the error: https://godbolt.org/z/KjnsEPTTq.

I'll try different environments to see if I can reproduce the probolem.

@MarijnS95
Copy link
Contributor

Cross-posting from #6184 (comment):

It must be a miscompile in SPIRV-Tools. I've followed this suggestion to disable validation with -Vd and the resulting spirv-dis output from x64 and arm64 Windows is identical bar the /Vd flag showing up in OpModuleProcessed as expected.

To rule out a difference in spirv-dis, even a binary diff between the two files only shows the CLI parameter difference in OpModuleProcessed.

@s-perron
Copy link
Collaborator

From the comments I cannot tell if this should be closed now or not. The edits to the linked comment seems to suggest this is not longer a problem.

@MarijnS95
Copy link
Contributor

@s-perron apologies for the monologue there, it appears no-one was around to discuss while I was debugging this solo.

The summary is that this issue appears to have the same cause as #6184: there is something in the final release artifacts (I'm not even sure if those are compiled by the Azure pipelines defined in this repository) that causes them to misbehave, which I cannot reproduce when compiling DXC manually.

Someone will have to debug the release process to understand why this is happening, and address it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V
Projects
Status: No status
Development

No branches or pull requests

3 participants