Skip to content

re-spirv generates invalid code on branching #20

Description

@demolke

See the discussion here godotengine/godot#119724

Godot is using the latest version of re-spirv (ff2b1a5) and has started crashing quite often.

Dumping the unoptimized and optimized spv, shows the error

spv.zip

spirv-val.exe SceneForwardClusteredShaderRD_18.stage0.a424c47a.original.spv

spirv-val.exe SceneForwardClusteredShaderRD_18.stage0.a424c47a.optimized.spv
error: line 1128: ID '1356[%1356]' has not been defined
  %1367 = OpIMul %uint %1356 %1366

I think it's a one off error when deleting a branch on a constant, it's looking at the wrong instruction - the branch instead of the merge (but I do understand this very little), nevertheless main...demolke:re-spirv:main fixes it for me.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions