startup: lower v_pk_min/max_i16 and v_pk_min/max_u16 in gfx2hlsl #3044
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3044"
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 R0Y00/Xbox2Windows. Originally posted by R0D4X on 2026-11-27T10:43:02Z.
What this changes
v_pk_max_i16(0x07),v_pk_min_i16(0x08),v_pk_max_u16(0x0c), andv_pk_min_u16(0x0d) intools/startup/gfx2hlsl.pyviaStage.packed_half(..., select_bits=True).op_selandop_sel_hilane selection,low16_only_vtracking when only low halves are read, andEXECmasking, while refusingclamp,neg_lo,neg_hi, badop_sel, lane masks, and invalid operands.Tests added
tests/startup_gfx2hlsl_v_pk_minmax_i16_u16_check.py: synthetic VOP3P decode viaG.decode()(including reservedsrc2rejection), 768-case grid evaluated directly against the emitted HLSL across all 4 ops and 3op_sel/op_sel_himodes,EXECmasking,low16_only_vaccept/refusal,Stagerefusals, unlowered controls, and FXCps_5_1+ DXCps_6_0offscreen readback draws with negative controls.tests/cmake/startup_gfx2hlsl_v_pk_minmax_i16_u16.cmakeandtests/checks/python-linux/startup_gfx2hlsl_v_pk_minmax_i16_u16.txt.Verification
Commit:
7b95d5daon Windows 11 x64 (10.0.26300.9974), MSVC19.44.35230, Windows SDK10.0.26100.0, FXC + DXC1.9.2602.17, D3D12 debug layer enabled (debug_errors=0 debug_warnings=0):ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_v_pk_minmax_i16_u16|^startup_tools_lint$': 4/4 passed, 0 skippedMicrosoft Basic Render Driver,1414:008c, driver10.0.26100.9818): passNVIDIA GeForce RTX 5080,10de:2c02, driver32.0.16.2124): passctest --preset release --no-tests=error -R '^startup_gfx2hlsl_v_pk_minmax_i16_u16': 3/3 passed, 0 skippeddocs_links_check.py,bidi_controls_check.py,startup_gfx2hlsl_handler_arity_check.py,startup_gfx2hlsl_pk_minmax_check.py,git diff --check): all passed.Scope: Covers synthetic
v_pk_min/max_i16andv_pk_min/max_u16fixtures in the offlinegfx2hlsltranslator and offscreen D3D12 draw harness; does not establish full-title startup or runtime execution.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T11:46:52Z.
Review: APPROVED
Reviewed
7b95d5dain integration tree1226e548onmain1c879506with the preceding packed-integer PRs in the tested merge order where applicable.python -B tests/startup_gfx2hlsl_v_pk_minmax_i16_u16_check.pypassed. Itsdraw <dxc> <offscreen_check> <warp|hardware> <fxc>invocation passed on WARP and RTX with both Debug and Release /O2 renderers, reusing builds of the unchanged renderer sources. Both signed and unsigned packed halves matched, including selected halves, masked execution, and mutation checks. Windows 11 26200.9974, SDK 10.0.26100, WARP 10.0.26100.9818, RTX 4060 Laptop driver 32.0.16.1656, D3D12 debug layer enabled. Hosted Windows, Linux Python and gfx1013 checks passed.