Skip to content

shader: constant-buffer-dependent s_cbranch_scc1 always takes the target in bounded mesh lowering #2435

Done

Description

@RavenCurseBurg

At b442b57f, the bounded mesh lowerer treats a constant-buffer-dependent SCC as always true for s_cbranch_scc1. Wave.exec_range joins the two possible descriptor arms only for s_cbranch_scc0. The SCC1 path evaluates the Python predicate object as a boolean at translation time.

I reproduced this with the source program in tests/mesh_join_descriptor_check.py. I reversed the two descriptor arms and changed the branch to s_cbranch_scc1, which should preserve its output. The two alternatives read vertex depth 0.5 (visible) or 1.625 (clipped), depending on a constant-buffer selector. All eight baseline SCC0 readbacks matched on a GeForce RTX 4060 and Windows WARP (traced/untraced, selectors 0 and 1). SCC1 matched with selector 0. With selector 1, both adapters rendered the triangle instead of clipping it: all 1,024 pixels differed and the traced run also reported a mesh export mismatch.

I’ll fix the branch direction in the existing bounded join and extend the source-built descriptor test for both predicates, including the resulting clipped image and vertex depth. This is separate from #2434, which handles a concrete SCC used as an explicit instruction operand.

AI-assisted with Codex + GPT-6.2 Astra (xhigh).

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