rdna2spirv: lower computed I/J barycentrics under --f16-interp-fallback (SHADER-F16-INTERP-COMPUTED-IJ) #2239
Open
github-bot
wants to merge 3 commits from
github-bot/gh-2239 into main
AGit
pull from: github-bot/gh-2239
merge into: github:main
github:main
github:docs/animation-merge-remnants
github:docs/story-dedup-and-cli
github:docs/restofworld-merge-remnants
github:docs/gamedata-dedup-tables
github:docs/textures-bcpack-tables-and-cli
github:docs/exe-fail-fast-shims-sync
github:fix/address-guard-wraparound-parity
github:fix/cvt-f16-denorm-and-clamp
github:docs/pso-cache-scope-note
github:docs/viewer-readme
github:docs/textures-arrays-dds-preview
github:docs/conformance-readme-status
github:fix/docs-validators-fences-urls
github:claude/loop-total
github:claude/pops-collision-seed
github:claude/dstorage-hold-page-reads
github:claude/host-image-copy-switch
github:feat/gdk-lifecycle-window-hook
github:claude/d16s8-uav-nvidia-fallback
github:feat/mfplat-offline-shim
github:claude/gameinput-slow-reader
github:fix/rt-null-barrier-clear
github:claude/depth-resolve-sample-positions
github:integration/palmetto-parity
github:claude/valu-literal-sext
github:claude/slot74-pool-handle
github:claude/rgb9e5-uint-alias-view
github:claude/fssm-root-layout-tables
github:feat/gdk-speech-display-lifecycle
github:asset-audio-skip-current
github:qemmhd/old-9940-rectangle-quad-lists
github:feat/ws2-offline-shim
github:qemmhd/rt-d16-unorm-uav
github:feat/xs-device-stops-7-9
github:qemmhd/rt-depth-same-base-shapes
github:qemmhd/rt-lazy-attachment-variant
github:feat/acphal-xma2-decoder
github:asset-audio-skip
github:codex/coord-claim-check-20261124-7e48
github:feat/xs-frame-pacing-presentx
github:feat/xs-device-vm-options
github:old-pr/9844
github:old-pr/9978
github:old-pr/9815
github:old-pr/10057
github:old-pr/9874
github:old-pr/9965
github:old-pr/9863
github:old-pr/10068
github:old-pr/10066
github:old-pr/10067
github:old-pr/10007
github:old-pr/10061
github:old-pr/10065
github:old-pr/10059
github:old-pr/10063
github:old-pr/10055
github:old-pr/10062
github:old-pr/10042
github:old-pr/10041
github:old-pr/10049
github:old-pr/10047
github:old-pr/10046
github:old-pr/10045
github:old-pr/10056
github:old-pr/10043
github:old-pr/10036
github:old-pr/10034
github:old-pr/9984
github:old-pr/10052
github:old-pr/10038
github:old-pr/10033
github:old-pr/10028
github:old-pr/10050
github:old-pr/9891
github:old-pr/9889
github:old-pr/10051
github:old-pr/10019
github:old-pr/10027
github:old-pr/10029
github:old-pr/10031
github:old-pr/10026
github:old-pr/9941
github:old-pr/10030
github:old-pr/10040
github:old-pr/9990
github:old-pr/10021
github:old-pr/9962
github:old-pr/10022
github:old-pr/10020
github:old-pr/10015
github:old-pr/10025
github:old-pr/9886
github:old-pr/10048
github:old-pr/10014
github:old-pr/10011
github:old-pr/9861
github:old-pr/10010
github:old-pr/10008
github:old-pr/9860
github:old-pr/10006
github:old-pr/9920
github:old-pr/9995
github:old-pr/10000
github:old-pr/10016
github:old-pr/10004
github:old-pr/10023
github:old-pr/9982
github:old-pr/9981
github:old-pr/9983
github:old-pr/9970
github:old-pr/9969
github:old-pr/9968
github:old-pr/9971
github:old-pr/9972
github:old-pr/9942
github:old-pr/9963
github:old-pr/9960
github:old-pr/9964
github:old-pr/9985
github:old-pr/9973
github:old-pr/9862
github:old-pr/9953
github:old-pr/10017
github:old-pr/9952
github:old-pr/9955
github:old-pr/9946
github:old-pr/9954
github:old-pr/9938
github:old-pr/9956
github:old-pr/9856
github:old-pr/9947
github:old-pr/9924
github:old-pr/9961
github:old-pr/9927
github:old-pr/9979
github:old-pr/10032
github:old-pr/9926
github:old-pr/5237
github:old-pr/9951
github:old-pr/9931
github:old-pr/9902
github:old-pr/9921
github:old-pr/9994
github:old-pr/9775
github:old-pr/9768
github:old-pr/9905
github:old-pr/9936
github:old-pr/9901
github:old-pr/9904
github:old-pr/9906
github:old-pr/9988
github:old-pr/9908
github:old-pr/9909
github:old-pr/9911
github:old-pr/9912
github:old-pr/9913
github:old-pr/9887
github:old-pr/9916
github:old-pr/9919
github:old-pr/9925
github:old-pr/9933
github:old-pr/9935
github:old-pr/9918
github:old-pr/9879
github:old-pr/9880
github:old-pr/9881
github:old-pr/9996
github:old-pr/9876
github:old-pr/9892
github:old-pr/9899
github:old-pr/9915
github:old-pr/9914
github:old-pr/9872
github:old-pr/9869
github:old-pr/9866
github:old-pr/9819
github:old-pr/10012
github:old-pr/9857
github:old-pr/9893
github:old-pr/9897
github:old-pr/9928
github:old-pr/9868
github:old-pr/9917
github:old-pr/9940
github:old-pr/9873
github:old-pr/9816
github:old-pr/10009
github:old-pr/9900
github:old-pr/9966
github:old-pr/9859
github:old-pr/9843
github:old-pr/9991
github:old-pr/10058
github:old-pr/9883
github:old-pr/9838
github:old-pr/9835
github:old-pr/9959
github:old-pr/9895
github:old-pr/9837
github:old-pr/9858
github:old-pr/9865
github:old-pr/9864
github:old-pr/9840
github:old-pr/9820
github:old-pr/4669
github:old-pr/9848
github:old-pr/9850
github:old-pr/9810
github:old-pr/9799
github:old-pr/9853
github:old-pr/9875
github:old-pr/9831
github:old-pr/9796
github:old-pr/9801
github:old-pr/9813
github:old-pr/9794
github:old-pr/7417
github:old-pr/9781
github:old-pr/9806
github:old-pr/9958
github:old-pr/9809
github:old-pr/9791
github:old-pr/9792
github:old-pr/10053
github:old-pr/9784
github:old-pr/9789
github:old-pr/9849
github:old-pr/9846
github:old-pr/9773
github:old-pr/9785
github:old-pr/9803
github:old-pr/9826
github:old-pr/9839
github:old-pr/9922
github:old-pr/9948
github:old-pr/7189
github:old-pr/9957
github:old-pr/9823
github:old-pr/9807
github:old-pr/9851
github:old-pr/9774
github:old-pr/9830
github:old-pr/9836
github:old-pr/9822
github:old-pr/9783
github:old-pr/9833
github:old-pr/9890
github:old-pr/9770
github:old-pr/9769
github:old-pr/9772
github:old-pr/9787
github:old-pr/9852
github:old-pr/9834
github:old-pr/9845
github:old-pr/9871
github:old-pr/9771
github:old-pr/9776
github:old-pr/10005
github:old-pr/9949
github:old-pr/9923
github:old-pr/9805
github:old-pr/9829
github:old-pr/9790
github:old-pr/9827
github:old-pr/9929
github:old-pr/9855
github:old-pr/9934
github:old-pr/9907
github:old-pr/9910
github:old-pr/9779
github:old-pr/9780
github:old-pr/9885
github:old-pr/9882
github:old-pr/9877
github:old-pr/9998
github:old-pr/4251
github:old-pr/9987
github:old-pr/9989
github:old-pr/9950
github:old-pr/9777
github:old-pr/10044
github:old-pr/9884
github:old-pr/2906
github:old-pr/5076
github:old-pr/9937
github:old-pr/9986
github:old-pr/3014
github:old-pr/9943
github:old-pr/9939
github:old-pr/4682
github:old-pr/4765
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
bug
Something isn't working
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
question
Further information is requested
wontfix
This will not be worked on
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2239
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@zmasi on GitHub · 2026-11-26 10:01 UTC · original
zmasi:fix/rdna2spirv-f16-interp-computed-ij→main· +614 −67 · 11 files · 3 commits · draftClaimed in the coordination issue as:
SHADER-F16-INTERP-COMPUTED-IJ(#1608)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.Because perspective-correct
BaryCoordKHR(I, J)already absorbs1/W, every smooth-interpolated inputP(both standardf32attributes and decoded--f16-interp-fallbackhalves) satisfies the exact affine relationP = P_0 + I \cdot P_{10} + J \cdot P_{20}across all four invocations of a2 \times 2screen quad. UnderF16_HALVES and not BARY_FALLBACK:OpDPdxFineandOpDPdyFine(OpCapability DerivativeControl, core Vulkan 1.0, zero device feature bits, zero extraLocations, zero geometry shader) ofBaryCoordKHR.y/.zand each computed(attribute, component)channel into uniform%entry.±inf, andNaNdeterminants using integer IEEE-754 normal-range bit comparisons (0x00800000 <= (OpBitcast_u32(det) & 0x7FFFFFFF) < 0x7F800000, avoidingOpFDiv-by-zero and MoltenVK'sOpFOrdNotEqualNaN hazard) so degenerate quads cleanly fall back to pixel-centerP_c.P(I', J') = 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.--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.python -m compileall -q make_game.py tools tests,tests/semantic/test_interp_computed_ij_fallback.py,tests/semantic/test_interp*.py(211/211),tests/test_shader_build_fallbacks.py(7/7),tests/test_run_gpu_tests.py(71/71),tests/test_text_write_line_endings.py,tests/test_docs_*.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
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.@EvgHaze on GitHub · 2026-11-26 10:19 UTC · original
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.
@ecox982745 on GitHub · 2026-11-26 10:19 UTC · original
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.
@lixonik on GitHub · 2026-11-26 10:56 UTC · original · reviewed
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.
@wavehs on GitHub · 2026-11-26 19:19 UTC · original · reviewed
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.
@zmasi on GitHub · 2026-11-26 23:49 UTC · original
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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.