You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
startup: src_scc is refused as an unknown scalar operand (1 of the remaining loading-screen shader refusals) #1820
Scalar source code 253 (src_scc) reads the SCC bit as the integer value 0 or 1. The translator refused it as an unknown operand, because Stage.u() only understood registers, inline constants and m0.
Fix
The generated shader already carries SCC as a bool scc (initialised, and updated by the scalar instructions that set it), so the source lowers to a conditional:
iftok=='src_scc':
# Source code 253 reads the SCC bit as the integer value 0 or 1 (used by e.g. s_mul_i32).return'(scc ? 1u : 0u)'
Measured on main at 813045b3:
form
before
after
s_mul_i32 s28, 1.0, src_scc
refused
s28 = 0x3f800000u * (scc ? 1u : 0u);
s_and_b32 s28, src_scc, s5
refused
s28 = (scc ? 1u : 0u) & s5; scc = s28 != 0;
The census form multiplies the raw bits of the inline float 1.0 (0x3f800000) by the SCC bit — that is what the scalar integer multiply does, and it is why the constant is not emitted as 1u.
Test
startup_gfx2hlsl_src_scc builds SOP2 encodings from the checked-in decoder's layout ([31:30] == 0b10, opcode w0[29:23], destination w0[22:16], src1 w0[15:8], src0 w0[7:0]), decodes them, then translates. Five checks: the census form decodes and lowers, src_scc works in the first source position as well, a bitwise op still updates SCC, and a definition followed by a use emits both statements (scc = s28 != 0; then s29 = 0x3f800000u * (scc ? 1u : 0u);).
dev: 19/21 - the 2 failures are pre-existing (below)
release: startup_gfx2hlsl_src_scc Passed 0.14 s
Fail-first, both caught:
refuse src_scc again -> Unsupported: operand 'src_scc'
lower it as the constant 0u -> "a defined SCC is read back by the next instruction" FAIL
Pre-existing failures, not from this PR
startup_gfx2hlsl_mad_preserve_{warp,hardware} fail in this dev tree with Unknown GPU operation or invalid arguments: --raw-uav-dump-sm62 — the built offscreen_check is stale. Confirmed identical on origin/main with the same binary. A rebuild fixes it; this branch does not touch that tool.
What this does not establish
That the emitted HLSL compiles or computes the right value — the test compares text; DXC/WARP were not run here.
The s_cselect-style conditional uses of SCC (cond operand) are separate and already handled.
Taking this one, with the approach the issue describes: u('src_scc') → (scc ? 1u : 0u), the two census forms as the positive cases, and a device-free check that builds the SOP2 words from the decoder layout, decodes, and translates. If you already have a branch for it, say so and I will drop mine.
I will report the fail-first runs (guard removed, both forms) and the startup_gfx2hlsl_* neighbours in the PR.
Withdrawing my #1896: #1821 by @triggered02 implements the same Stage.u() branch and was opened 73 minutes earlier, so
theirs is the one to merge. I claimed the issue without noticing the branch already open on it — that was my miss.
The two things I verified and that #1821 should keep: the census form has to preserve the raw bits of the inline float
(s28 = 0x3f800000u * (scc ? 1u : 0u);), and returning 1u instead of (scc ? 1u : 0u) is the mutation a fixture on this
path should catch. Details are in the closed PR.
Activity
ChazY11 commentedon Nov 24, 2026
Taking this one, with the approach the issue describes:
u('src_scc')→(scc ? 1u : 0u), the two census forms as the positive cases, and a device-free check that builds the SOP2 words from the decoder layout, decodes, and translates. If you already have a branch for it, say so and I will drop mine.I will report the fail-first runs (guard removed, both forms) and the
startup_gfx2hlsl_*neighbours in the PR.ChazY11 commentedon Nov 24, 2026
Withdrawing my #1896: #1821 by @triggered02 implements the same
Stage.u()branch and was opened 73 minutes earlier, sotheirs is the one to merge. I claimed the issue without noticing the branch already open on it — that was my miss.
The two things I verified and that #1821 should keep: the census form has to preserve the raw bits of the inline float
(
s28 = 0x3f800000u * (scc ? 1u : 0u);), and returning1uinstead of(scc ? 1u : 0u)is the mutation a fixture on thispath should catch. Details are in the closed PR.
startup: read src_scc as the SCC bit
startup: verify reaching SCC writer before reading src_scc
startup: verify reaching SCC writer before reading src_scc
startup: verify reaching SCC writer before reading src_scc
startup: verify reaching SCC writer before reading src_scc (R0Y00#1821)
startup: keep src_scc proven at a branch target one uniform SCC write…