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

spirv-opt: MergeReturn pass places DebugFunctionDefinition in non-first block of a function. #5959

Open
csyonghe opened this issue Jan 23, 2025 · 0 comments

Comments

@csyonghe
Copy link

csyonghe commented Jan 23, 2025

Given this SPIRV Input:

in.zip

Running

spirv-val in.spv --scalar-block-layout

returns no errors.

However, if we run the merge return pass on this spirv and then validate its output, we will get an error:

spirv-opt in.spv --scalar-block-layout --merge-return -o out.spv
spirv-val out.spv --scalar-block-layout

Produces:

error: line 171: NonSemantic.Shader.DebugInfo.100 DebugFunctionDefinition: must be in the entry basic block of the function
  %38 = OpExtInst %void %2 DebugFunctionDefinition %34 %main

Observed with SPIRV-Tools v2024.4 v2024.4.rc2-0-g4d2f0b40.

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

No branches or pull requests

1 participant