rdna2spirv: lower computed I/J barycentrics under --f16-interp-fallback (SHADER-F16-INTERP-COMPUTED-IJ) #2239
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2239"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-26T10:01:25Z.
Claimed in the coordination issue as:
SHADER-F16-INTERP-COMPUTED-IJ(https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7188273837)Depends on: #1426 (orthogonal topic: #1426 handles
--bary-fallbackwithFlat vec4[3]geometry-shader pass-through and leavesF16_HALVES and not BARY_FALLBACKrefused; listed here because adjacent hunk context intools/rdna2spirv.pyandtests/test_shader_build_fallbacks.pysits nearby on merge)What and why
When
per_vertex_inputsis unavailable and no geometry shader is used (--f16-interp-fallbackwithout--bary-fallback, e.g. on MoltenVK / Apple Silicon whereBuiltIn BaryCoordKHRis available withoutPerVertexKHRor geometry shaders),interp_ij_analysisintools/rdna2spirv.pyrefused all 207 pixel shaders in the corpus that compute custom(I, J)barycentrics into VGPRs (computed I/J pair under --f16-interp-fallback: no PerVertexKHR inputs).OpCapability InterpolationFunction(InterpolateAtOffset) cannot be used without enablingsampleRateShadingand is rejected onBaryCoordKHRby SPIRV-Cross MSL.In real arithmetic, perspective-correct
BaryCoordKHR(I, J)absorbs1/Wso every smooth-interpolated inputP(both standardf32attributes and decoded--f16-interp-fallbackhalves) is affine in(I, J)across a2 \times 2screen quad (P = P_0 + I \cdot P_{10} + J \cdot P_{20}). UnderF16_HALVES and not BARY_FALLBACK(shortcut:inGen.ij_quad_eval):OpCapability FragmentBarycentricKHR+SPV_KHR_fragment_shader_barycentric(features: ["fragmentShaderBarycentric"]inindex.jsonforBuiltIn BaryCoordKHR) alongside core Vulkan 1.0OpCapability DerivativeControl(zero extraVkPhysicalDeviceFeaturesbits, zero extraLocations, zero geometry shader), hoistingOpDPdxFineandOpDPdyFineofBaryCoordKHR.y/.zand each computed(attribute, component)channel into uniform%entry.P(I', J') \approx P_c + \alpha \cdot d_x P + \beta \cdot d_y Pwith pure scalar ALU at eachv_interpsite, including inside non-uniformEXEC-masked branches and loops.shortcut:error bound anddet == 0fallback: because%baryand smooth fragment inputs arrive quantized to binary32 (per-lane residual|e_q| \le \frac{1}{2}\operatorname{ulp}(P_q) + |P_{10}|\frac{1}{2}\operatorname{ulp}(I_q) + |P_{20}|\frac{1}{2}\operatorname{ulp}(J_q)), 1-pixel quad finite differences amplify input rounding by1 + 2|\alpha| + 2|\beta|(\alpha \approx (I' - I_c) / (\partial I / \partial x), proportional to pixel step up to the primitive's pixel span): sub-pixel shifts (|\alpha|, |\beta| \le 1px) stay near input precision (\sim 2 \times 10^{-6}at1920x1080), while distant constant jumps across wide primitives scale with pixel span (e.g.2.04 \times 10^{-3}/1f16 ulp at1080pon[-2.75, 10], or0.358/>300f16 ulps when jumping>1,100px to(0, 0)across a2048-px perspective triangle withP \in [1.5, 4096]). Degenerate zero-area, 1D/line-primitive (constantJ \implies \det = 0), subnormal,\pm\infty, andNaNdeterminants are guarded via integer IEEE-754 normal-range bit comparisons (0x00800000 <= (OpBitcast_u32(det) & 0x7FFFFFFF) < 0x7F800000, avoidingOpFDiv-by-zero and MoltenVK'sOpFOrdNotEqualNaN hazard) and return pixel-centerP_c.--bary-fallback(BARY_FALLBACK) refusal and defaultPerVertexKHRemission completely unchanged.Tested
--f16-interp-fallback):26,296 / 26,503->26,503 / 26,503(100%) translated and26,503 / 26,503passspirv-val(--target-env vulkan1.2 --allow-offset-texture-operand); all207 / 207previously refused pixel shaders passspirv-val, remain byte-identical under default flags, and remain refused under--bary-fallbackalone.LEONIDA_F16_INTERP_FALLBACK=1 LEONIDA_BARY_FALLBACK=0,VK_LAYER_KHRONOS_validation1.4.363):runtime/test/shaders/build.py vs_ids ps_ij_computed ps_interp_f16_high vs_f16_pack:4/4translated,4/4spirv-valpass (OpCapability FragmentBarycentricKHR+OpCapability DerivativeControl, zeroPerVertexKHR).vk_pipeline_check:2/2PS modules ok,2/2PS pipelines ok,0validation errors.vk_harness vs_ids.spv ps_ij_computed.spv(64x64):4,096 / 4,096pixels pass (exact_xyw = 4096/4096,exact_z_bits = 4096/4096,max_err_z = 0.0);scripts/run_gpu_tests.py --filter ps_ij_computedpasses1/1(and independently verified natively on Apple M3 / M3 Pro MoltenVK and RTX 5070 / RTX 4090 in review comments below).python -m compileall -q make_game.py tools tests,tests/semantic/test_interp_computed_ij_fallback.py(including64x64,1920x1080, and2048x2048perspective finite-difference error bounds against a binary64 Jacobian oracle plus 1D line-primitivedet == 0fallback),tests/semantic/test_interp*.py,tests/test_shader_build_fallbacks.py,tests/test_run_gpu_tests.py,tests/test_text_write_line_endings.py,tests/test_docs_links.py, andpython -I scripts/check_no_game_data.pyacross all touched files (all pass).GPUs tested: NVIDIA GeForce RTX 3090, driver 610.88 (Vulkan 1.4.341, Khronos validation layer 1.4.363), Windows 11 x64 (Profile L)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.Imported from ubiquitarianism/leonida. Originally posted by EvgHaze on 2026-11-26T10:19:16Z.
Apple check — this turns a skip into a real GPU pass on the one driver this fallback is for.
a73a57e--bary-fallback/--f16-interp-fallback"cd8d9aa7aps_ij_computed: "computed I/J pair words and v/2 within 1e-6"VK_KHR_fragment_shader_barycentric"So on the device this rule exists for —
BaryCoordKHRpresent,PerVertexKHRabsent — the fixture goes from never running to running and matching within 1e-6. That is the pair the old skip named and the fallback now covers.KosmicKrisp is unchanged in both trees, which is correct rather than a regression: it has no
VK_KHR_fragment_shader_barycentric, so there is nothing to lower onto.python3 -I scripts/run_semantic_tests.py tests/semantic: 499 files, 6357 tests, 0 failed (204 s, 8 jobs) at this head.One note for the PR body: the merge with #1426 is the only untested combination here — I applied this head on its own, not on top of #1426.
AI-assisted. No game data: hand-written fixtures, and every number above is test output.
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-26T10:19:55Z.
The perspective fixture on an RTX 4090 shows a resolution-dependent precision difference in the derivative fallback. At 1920×1080 the native path returned the expected half-precision value of 1.5 for every covered pixel. The fallback returned 1.4990234375 at one pixel. The computed f32 channel also accumulated measurable error as the viewport grew.
I built
vk_harnessand translatedtests/semantic/fixtures/ps_ij_computed_deriv_fallback.asmfromcd8d9aa7a897in both modes. I used the vertices, attributes, and packed halves fromtest_perspective_fixture_branch_and_f16_halves. A synthetic vertex shader exported the native inputs or their decoded halves. The clips had W = (1, 2.5, 4). Each row compares RGBA32F readback against the perspective-correct value calculated at each covered pixel center. Both draws ran on Windows, NVIDIA 616.64.At 1080p the largest f32 difference occurred at (1795, 50). The branch snaps both weights to 0.25, giving exactly 3.0 for green. Native returned 3.0, and the fallback returned 3.00204277. Across the image, 1,059 pixels exceeded 0.001 absolute error in this channel. The two compilation modes covered the same pixels. A second 1080p draw produced byte-identical readback for each mode independently.
A 1080p perspective case alongside the existing orthographic GPU check would let reviewers track this error as the lowering evolves. The same perspective fixture on the M3 would make a good comparison with these NVIDIA results and the orthographic MoltenVK pass.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-26T10:56:31Z.
Review: COMMENTED
Local synthetic checks at this head: 28 computed-I/J semantic, 7 shader-build fallback, and 71 GPU runner tests passed in Ubuntu on WSL. I also translated the hand-written
vs_ids/ps_ij_computedpair in default and--f16-interp-fallbackmodes, validated both pairs withspirv-valand ran the Windows Vulkan harness. All 4,096 readback pixels matched in each mode. GPU: NVIDIA GeForce RTX 5070, driver 610.88, Windows 11. These runs cover Vulkan and the synthetic fixtures. MoltenVK and the retail corpus were outside this run.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T19:19:29Z.
Review: COMMENTED
macOS arm64 / GPU check of #2239 (SHADER-F16-INTERP-COMPUTED-IJ). This is a translator change plus fixtures; the lowering it adds (
OpDPdxFine/OpDPdyFinequad reconstruction) runs on the exact class of device the flag exists for, so I could execute it natively rather than only on the CPU.Tested head
cd8d9aa7amerged ontomainbdbc7e923as merge1d7ddff26(clean, no conflicts).Environment: Apple M3 Pro, arm64 (subgroups 4..32), macOS 27.2.1, Apple clang 21.0.0, CMake 4.5.0, CPython 3.15.2,
llvm-mc23.1.5, SPIRV-Tools v2026.4, glslang 16.6.0, MoltenVK 1.4.0, KosmicKrisp = Mesa 26.3.0 (32-wide).The new path runs on MoltenVK, which is the device class the flag was added for
tools/vk_subgroup_info.pyon MoltenVK reportsper_vertex_inputs: false, sorun_gpu_tests.pyselects--f16-interp-fallbackby itself - noLEONIDA_F16_INTERP_FALLBACK=1needed, which is the honest macOS case.run_gpu_tests.py --filter ps_ij_computedon the merge, MoltenVK:PASS ps_ij_computed - computed I/J pair words and v/2 within 1e-6(the runner's own checker). Before this PR that fixture was skipped by the runner's oldor f16_interp_fallback()guard and could not be translated at all.278 shaders: 278 translated, 278 pass spirv-val, then196 passed / 3 failed / 69 skippedof 268. The three failures are exactly main's on this driver (cs_fma_fused,cs_imgatomic_ext,ps_ssharp); the one-test delta against the same-main baseline (195 / 3 / 70) isps_ij_computedmoving from SKIP to PASS.190 / 5 / 73, the same five failures as main's baseline (cs_bvh,cs_bvh32,cs_imgatomic_ext,ps_cndmask_sign_mods,ps_valu16_mad_sel). Hereps_ij_computedskips withreads BaryCoordKHR and the device has no VK_KHR_fragment_shader_barycentric, so this driver cannot exercise the lowering - see the second finding.Translator and unit suites
501 files, 6373 tests, 0 files failed in 61 s with 12 jobs(main is500 / 6367, so the PR adds one file and six cases and breaks none).tests/semantic/test_interp_computed_ij_fallback.py: 6 tests, OK.tests/semantic/test_interp_computed_ij.py: OK.tests/test_shader_build_fallbacks.pyandtests/test_run_gpu_tests.py: OK.Negative controls
git checkout bdbc7e923 -- tools/rdna2spirv.py), keep the new test file: the new semantic file reportsFAILED (errors=4), and the GPU run becomesFAIL ps_ij_computed missing .spv (translation failed)- the oldcomputed I/J pair under --f16-interp-fallback: no PerVertexKHR inputsrefusal. Restored.ij_quad_eval's I offset from%ij_icto%ij_jc(tools/rdna2spirv.py:15103). Semantic file: 3 failures. GPU on MoltenVK:FAIL ps_ij_computed 4039 pixels without the computed-pair words, v/2 off by 0, i.e. 4039 of 4096 pixels differ - the GPU fixture really does depend on the arithmetic, not just on the module existing. Restored.%ij_nz = OpLogicalAnd %bool %ij_dlo %ij_dlo, dropping the>= 0x7F800000upper bound): 2 failures in the new semantic file - the±inf/NaNdegenerate cases are pinned, not just the zero-area one. Restored.Finding: the new docs row says
v_interp_p1lv_f16takesP_0fromvsrc2; no code path reads itdocs/design.md:524ends with "v_interp_p1lv_f16still overridesP_0with the half decoded fromvsrc2(Gen.f16_in)". There is no such override: the p1lv branch (tools/rdna2spirv.py:11781-11800) callsattribute(...)and, under--f16-interp-fallback,attribute()returnsij_quad_eval(:15140and:15151) built from the interpolated attribute and its derivatives;Gen.f16_inis never reached from a p1lv operand. I checked it by translating a computed-I/J p1lv pair withv10 = 0and withv10 = 0x3f800000: the two SPIR-V texts differ only in the deadOpStore %reg_v10 ...and the constant it stores, and%reg_v10is never loaded. The non-computed p1lv path behaves the same way (the store is dead there too), so this is inherited, but the sentence is new in this PR and a reviewer or a later change would rely on it. Effect: for a p1lv pair with a computed(I, J),P_0is the interpolated attribute's vertex-0 value, not the suppliedvsrc2; the corpus has 0 computed*_f16ops (the row says so), so no known shader is wrong today. Either implement thevsrc2override or drop that clause and add a semantic assertion that two differentvsrc2constants give the same module, so the claim cannot creep back.Finding: the lowering adds a
fragmentShaderBarycentricrequirement, and the row reads as if it adds noneassemble()setsbary = ... or bool(gen.ij_deriv)(tools/rdna2spirv.py:16214), so these modules loadBuiltIn BaryCoordKHRand carryOpCapability FragmentBarycentricKHR+SPV_KHR_fragment_shader_barycentric. The index does record it -features: ["fragmentShaderBarycentric"]for the generatedps_ij_computed.spv- and both drivers act on it (MoltenVK has it, KosmicKrisp skips). But the row says the lowering declares "core Vulkan 1.0OpCapability DerivativeControl(unconditional, zeroVkPhysicalDeviceFeaturesbits, zero extraLocationslots)"; for the 207 shaders that previously required nothing under this flag, the module now requiresfragmentShaderBarycentric. That is unavoidable (there is no other way to getI,Jwithout per-vertex arrays), andmake_game.pyselecting--f16-interp-fallbackwhereper_vertex_inputsis false means a device with neitherPerVertexKHRnor plain barycentrics gets modules it cannot create a pipeline for - the same dead end as the old refusal, not a regression. It should be written down as a device requirement, though, because "zeroVkPhysicalDeviceFeaturesbits" is the phrase a follow-up will quote when deciding that this path needs no feature gate.Nit: the runner's skip under
--bary-fallbacknow sayscomputed I/J pairs need PerVertexKHR inputs: no --bary-fallback, which reads backwards ("no --bary-fallback" as the reason it cannot run, when it is the flag that is on). It only shows up on ANV-style fallback runs, but the old message named both flags and was clearer.Not run: Windows and the full corpus. The 26,503-shader count and the RTX 3090 result cannot be reproduced here (needs the game copy and Windows); what I can say is that on this machine all 278 GPU fixtures translate and validate, and the computed-pair fixture passes on the driver the flag targets. The change touches no runtime C++, so no shim or D3D12 test is affected, and I did not re-run the C++ suite.
python -I scripts/check_no_game_data.pyon all 11 changed files: clean.No game files. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-26T23:49:47Z.
Thanks @EvgHaze, @wavehs, @lixonik, and @ecox982745 for the Apple M3 / M3 Pro MoltenVK, KosmicKrisp, RTX 5070, and RTX 4090 hardware checks and detailed review.
Merged
main(6f5086f2f) and pushedae364461baddressing each point:v_interp_p1lv_f16vsrc2wording (docs/design.md,tests/semantic/test_interp_computed_ij_fallback.py): Removed the inaccuratevsrc2override clause sodocs/design.mdmatches the translator (P_0comes from the interpolated attribute andvsrc2is unread, as on the non-computed path;0computed*_f16ops in the corpus), and addedtest_p1lv_f16_computed_ij_uses_interpolated_attribute_not_vsrc2asserting%reg_v10is unread and varyingv10(0vs0x3f800000) leaves module code and quad outputs invariant.fragmentShaderBarycentricdevice requirement (docs/design.md,tests/semantic/test_interp_computed_ij_fallback.py): Clarified indocs/design.mdthat the lowering emitsOpCapability FragmentBarycentricKHR+SPV_KHR_fragment_shader_barycentric(features: ["fragmentShaderBarycentric"]inindex.jsonforBuiltIn BaryCoordKHR), so devices needVK_KHR_fragment_shader_barycentric(passing natively on MoltenVK M3 / M3 Pro while skipping on drivers withoutVK_KHR_fragment_shader_barycentricsuch as KosmicKrisp), whereasDerivativeControlitself adds no extraVkPhysicalDeviceFeaturesbit orLocationslots; pinnedFragmentBarycentricKHRandfragmentShaderBarycentricin the semantic assertions.--bary-fallbackskip wording (scripts/run_gpu_tests.py,runtime/test/shaders/check.py,tests/test_run_gpu_tests.py): Updated both runners'--bary-fallbackskip reason toSKIP (computed I/J pairs need PerVertexKHR inputs or BaryCoordKHR; unsupported under --bary-fallback).1920x1080perspective precision (docs/design.md,tests/semantic/test_interp_computed_ij_fallback.py): Addedtest_1080p_perspective_precision_subpixel_vs_full_viewport_jump(W = (1, 2.5, 4)at1920x1080, including the(1794.5, 50.5)quad) and documented the error bound indocs/design.md. Because smooth fragment inputs andBaryCoordKHRarrive from the rasterizer already perspective-divided and rounded to binary32, 1-pixel quad differences scale ~1-ulp input rounding byhypot(alpha, beta): sub-pixel barycentric shifts (|alpha|, |beta| <= 1px) stay within~2e-6across1920x1080, while jumping ~1,000 pixels across the viewport to a constant(0.25, 0.25)amplifies binary32 rasterizer input quantization to1.09e-3(2.04e-3/1f16 ulp on RTX 4090 hardware) — agreeing within< 2e-6against an exact binary64 Jacobian solve on the same binary32 quad inputs.No game files. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T09:33:07Z.
Merged
mainand pusheda5d954a4abefore marking this PR ready for review:# shortcut:note onGen.ij_quad_eval(tools/rdna2spirv.py) and updateddocs/design.mdto state the(1 + 2|alpha| + 2|beta|) * m_ulpbinary32 quad finite-difference amplification bound (alpha ~ (i - I_c) / (dI/dx), proportional to pixel step up to the primitive's pixel span) and thatdet == 0(including 1D/line primitives whereJis constant across the quad) returns pixel-centerP_crather than extrapolating along one axis.test_perspective_fixture_branch_and_f16_halvesagainst an independent binary64 Jacobian oracle and addedtest_wide_2048px_perspective_extrapolation_bound_and_line_det_zero_fallbackcovering a2048-px perspective triangle (P in [1.5, 4096.0]) and 1D linedet == 0fallback (255/255semanticinterptests pass locally, andps_ij_computedpasses on the macOS MoltenVK CI runner).No game files. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-28T10:02:14Z.
Tested the new 2048 × 2048 perspective case on a physical RTX 4090 (Windows, NVIDIA 616.64) at
a5d954a4a789591ec57330ced9705096fedefba0. The local interpolation target stayed within 0.00141 of the analytical value throughout the triangle. A jump back to vertex 0 showed a much larger error on the derivative fallback.I translated the instruction list directly from
test_wide_2048px_perspective_extrapolation_bound_and_line_det_zero_fallbackin each mode. A synthetic vertex shader supplied the test's W values (1, 1.3, 1.7) and attributes (1.5, 4096, 5.5), using packed or decoded halves as appropriate. I builtvk_harnessfrom the same revision. Both modes covered the same 2,096,128 interior pixels, with the clear value everywhere else. Two draws per mode produced byte-identical RGBA32F readbacks within that mode.At pixel (1993, 39), native returned 1.5 in both distant-target channels. The fallback returned 2.687353 and 2.6875. The distant-target f32 error exceeded 0.30 at 105,661 pixels (5.04%). The subpixel reference uses binary64 perspective-correct barycentrics with the vertex shader's binary32 W values and the fixture's (+2^-12, -2^-12) shift.
The nine CPU tests in
test_interp_computed_ij_fallbackpassed. Both vertex and both fragment modules passedspirv-valfor Vulkan 1.2. The GPU test covered the triangle case. The degenerate-line case was checked on CPU. These figures describe this high-range synthetic input on one NVIDIA driver. AI-assisted with OpenAI Codex (GPT-6).Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T10:11:00Z.
Thanks @ecox982745 for running the 2048×2048 perspective fixture on physical RTX 4090 hardware at
a5d954a4aand sharing the exact readback figures! Seeing0.001409peak error (< 2e-3) across all 2,096,128 covered pixels for the(+2^-12, -2^-12)subpixel shift alongside1.187353(1.1875decoded f16) on the full-viewport jump back to vertex 0 directly confirms the# shortcut:local-linear vs wide-perspective extrapolation regime on silicon. The ~3.3x factor over the pure IEEE-7540.5-ulp finite-difference residual at 2048 px aligns cleanly with hardware fixed-point barycentric quantization before quad differencing.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by EvgHaze on 2026-11-28T11:01:14Z.
Apple check — merged onto
main(f96cec8cc), M3, both drivers.No regression against
main(5b6ffd5a8) on either driver:mainmainThe failing set is identical on both revisions:
cs_imgatomic_extandps_ssharpon MoltenVK;cs_bvh,cs_bvh32,cs_fma_fused,cs_imgatomic_ext,ps_cndmask_sign_mods,ps_valu16_mad_selon KosmicKrisp. The newps_ijcomputed-derivative fallback fixture passes on both drivers, and it accounts for the one extra semantic file and the six extra tests.One note on the head.
a5d954a4is 213 commits behindmainand predates #1724, which rewrotecs_fma_fused's f16 operands to be read at run time. At that headcs_fma_fusedfails on MoltenVK in 3 of 3 runs (word 7 (f16): got 0x00000000), whilemainpasses it in 3 of 3 — so it is staleness of the branch, not this change. Merging the currentmainin cleared it (the merge applied without conflicts), and the numbers above are from that merged state. A rebase before merge would keep CI and reviewers on the same footing.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T11:06:35Z.
Thanks @EvgHaze for the Apple M3 MoltenVK 1.4.2 (
198/271passed,71skipped) and KosmicKrisp 26.3.1 re-verification and for flagging the pre-#1724cs_fma_fusedstaleness! Merged currentmain(6647c033a, including #1724) cleanly inf77b4d80d(9/9test_interp_computed_ij_fallback.pypassed, zero code changes beyond the fast-forward merge).AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by EvgHaze on 2026-11-28T11:14:24Z.
Re-checked the merged head
f77b4d80d(currentmain+ this branch, #1724 included). The pre-#1724 staleness is gone.cs_fma_fusedon MoltenVK: passed 3 of 3 runs atf77b4d80d(it passed 3/3 onmainand failed 3/3 at the old heada5d954a4), so the earlier failure was the missing #1724 fixture update and nothing in this change. The KosmicKrisp side still reads0x7352for the f16 word, which is the expected divergence thatdocs/testing.mddocuments for Mesa 26.3.1 on this machine — the same as onmain.The rest of the failing set is unchanged from
mainand unrelated to this PR:cs_imgatomic_extandps_ssharpon MoltenVK;cs_bvh,cs_bvh32,cs_fma_fused,cs_imgatomic_ext,ps_cndmask_sign_mods,ps_valu16_mad_selon KosmicKrisp. The newps_ijfallback fixture (test_interp_computed_ij_fallback.py) passes on both drivers, in the suite and in the semantic run.Green from the Apple M3 side as far as this branch is concerned.
AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T13:41:45Z.
Review: APPROVED
Re-reviewed and verified the updated head
f77b4d80d(incorporating the review updates andmainmerge including#1724).Code audit:
tools/rdna2spirv.py:Gen.ij_quad_evalcleanly lowers computed I/J barycentrics under--f16-interp-fallbackvia%entry2x2 screen-quad fine derivatives with integer-bit IEEE-754 normal-range guarding ondet(0x00800000 <= |det|_bits < 0x7F800000), leaving defaultPerVertexKHRand--bary-fallbackrefusal behavior unchanged.Verification (Windows 11, Python 3.12,
llvm-mcLLVM 21.1.8,spirv-as/spirv-valVulkan SDK 1.4.363.1):python tests/semantic/test_interp_computed_ij.py -v: 22/22 passed.python tests/semantic/test_interp_computed_ij_fallback.py -v: 9/9 passed.python -I tests/test_shader_build_fallbacks.py -v: 7/7 passed.python -I tests/test_run_gpu_tests.py -v: 75/75 passed.python -I scripts/check_no_game_data.py: passed.AI-assisted (Antigravity, Gemini).
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T02:59:48Z.
Verified by OreoFR
48bae6cad+ PR head06e532729(tested as a merge; it also merges without conflict on the newer main5825b02ff)test_interp_computed_ij.py,test_interp_computed_ij_fallback.py(tests/semantic),python -I tests/test_run_gpu_tests.py,tests/test_shader_build_fallbacks.py; translator suitetest_run_gpu_tests3 FAIL of 75 (missing .spv / SKIP message under the fallback);test_shader_build_fallbacksalready passes on main; translator suite on main: 526 files, 6506 tests, 1 file failing (test_valu_cvt_f16_int16_mods, a known main failure)gta6rt.exebuilds and links;dumpbin /dependentsshows the same DLLs as main, no network DLL)AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-29T03:36:22Z.
Merging, thank you @zmasi! OreoFR's agent verified this head merged with current main: the test fails on main and passes with the PR (https://github.com/ProjectLeonida/mandy/pull/2239#issuecomment-7249774648), and it still merges cleanly.
AI-assisted (Claude Code, Claude Opus 5.5), on behalf of DadaCap.