Commit Graph

290 Commits

Author SHA1 Message Date
806ca614e3 Merge pull request #1665 from Vonsek 2026-11-22 08:08:36 -05:00
1676a01a80 Merge pull request #1641 from Vonsek 2026-11-22 08:08:22 -05:00
0a1b235854 Merge remote-tracking branch 'upstream/main' into codex/implicit-typed-mips
# Conflicts:
#	scripts/run_gpu_tests.py
2026-11-22 14:05:00 +01:00
fa34cc023a Merge remote-tracking branch 'upstream/main' into codex/array-image-query-size
# Conflicts:
#	tests/test_shader_checks.py
2026-11-22 14:04:59 +01:00
c2251c16ce Tests: s_and/s_or/s_andn2_saveexec_b64 and s_andn2_wrexec_b64 with VCC and SGPR-pair sources in wave64
cs_w64x_saveexec_b64 checks the new EXEC per lane, D (old or new EXEC) and SCC, with old EXEC and S0
different in each 32-lane half. test_saveexec_b64.py runs the four ops on all 64 lanes for both sources
against the ISA lines, and the fixture.

AI-assisted.
2026-11-22 14:02:17 +01:00
9018411c74 run_gpu_tests checks ps_ij_computed with check.py's rule
#1545 added ps_ij_computed and its check to check.py only, so run_gpu_tests.py failed it with "no checker defined".
The check is now check.ij_computed_problem, used by both runners; run_gpu_tests also skips it under
--bary-fallback like check.py. Passes in both GPU runs on an RTX 4060 Ti.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:49:48 -05:00
e5f9661dac fix(translator): preserve implicit mip selection for typed 2D samples
Sampling an integer image through a float view makes D16 convert the wrong numeric values. Compute the quad derivatives before branching to the matching view so implicit minification still chooses the correct level.
2026-11-22 13:47:51 +01:00
3c6380c22e fix(test): preserve the upstream lane-select comment 2026-11-22 13:47:51 +01:00
e1703a1c60 Merge pull request #1609 from Luiz Neves 2026-11-22 07:38:32 -05:00
19b1ec0af4 Merge pull request #1585 from LuanFreitas 2026-11-22 07:38:23 -05:00
868f3f8153 Merge pull request #1584 from AlxcBTW 2026-11-22 07:38:23 -05:00
4717f13f7c Merge pull request #1565 from Vyral1978
# Conflicts:
#	docs/design.md
2026-11-22 07:38:15 -05:00
c7dfd34fda Merge pull request #1552 from Luiz Neves 2026-11-22 07:38:08 -05:00
12eab0b570 Merge pull request #1489 from AlxcBTW 2026-11-22 07:38:00 -05:00
7173782f05 GPU test cs_w32_new_ops: ops merged today with CPU-only checks
s_quadmask_b32/b64, s_bitreplicate_b64_b32, v_cvt_pknorm_i16/u16_f32,
ds_wrxchg2_rtn_b32 and the ds_nop / v_clrexcp no-ops were merged with
semantic tests only. cs_w32_new_ops.asm has lane 0 of a wave32 group
store one word of each; check.py and run_gpu_tests.py expect the eight
words (derived in the .asm header), so CI runs it on llvmpipe.

tests/semantic/test_new_ops_fixture.py runs the fixture on the CPU,
checks the words against values computed from the ISA definitions, and
that both GPU runners expect the same words.
2026-11-22 09:35:20 -03:00
444de13ca4 GPU test cs_w32_misc_ext: more ops that only had CPU checks
s_nand_b64, s_xnor_b64, v_cvt_pk_u16_u32, v_cvt_pk_i16_i32,
v_mad_u32_u16, v_mad_i32_i16, ds_cmpst_rtn_b32 and ds_write2_b64 /
ds_read2_b64 were added with semantic tests only. cs_w32_misc_ext.asm has
lane 0 of a wave32 group store one word of each; check.py and
run_gpu_tests.py expect the eight words (derived in the .asm header), so
CI runs it on llvmpipe.

tests/semantic/test_misc_ext_fixture.py runs the fixture on the CPU,
checks the words against values computed from the ISA definitions, and
that both GPU runners expect the same words.
2026-11-22 09:35:20 -03:00
67c8ffe45c fix(shader): query dimensions from 2D array image views
Array resource queries need the array at the descriptor index so the third component reports the view's layer count. Check the returned dimensions through a draw against the existing 12-layer texture.
2026-11-22 13:33:58 +01:00
9f681772df Tests: skip ps_vcmpx_forms when fragment subgroups may run narrower than 32 (TEST-205)
On devices with minSubgroupSize under 32, vk_harness cannot pin fragment (#1318), so the
v_cmpx EXEC packing in ps_vcmpx_forms is not comparable to the 32-lane expectation.
2026-11-22 09:33:33 -03:00
f3977cac42 Merge main into test-184-image-ops
main is at 41f44826. Two conflicts, both sides kept:

- docs/design.md: both sides edited the one-line "Ray tracing" row. Main's
  row (the triangle node types and their vertex slots), with this branch's
  sentence about cs_bvh32 where it stood.
- tests/test_shader_checks.py: main counts ps_ssharp (9 -> 10) and patches
  sampler_test on the lines next to this branch's STORE_WORDS / GET_LOD_TESTS
  terms and its get_lod_test patch. All four lines.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 07:33:23 -05:00
21a8e07168 Fix what the merge round broke: w64_graphics fixtures, the R24G8 FORMAT_SUPPORT check, four tools' stdout
- run_gpu_tests.py: #1541's wave64 pixel fixtures (runtime/test/shaders/w64_graphics.py FIXTURES, tiers A-C) are
  checked by that runner; run_gpu_tests picked up their .asm and failed 14 of them with "no checker defined".
  It now leaves w64_graphics.FIXTURES to that runner.
- d3d12_d24_support_test (#1493): expected DEPTH_STENCIL in FORMAT_SUPPORT for R24G8_TYPELESS. Measured here, the
  host D3D12 (RTX 4060 Ti and WARP) reports 0x001010b0 for R24G8_TYPELESS and 0x003110b0 (DEPTH_STENCIL) only for
  D24_UNORM_S8_UINT, which #1511's per-format rules follow; the check now expects the bit for the typed format only.
- fma_mix_probe, text_tables, wave64_halves, xdxr_bvh: new tools without #1428's stdout errors='replace' guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:29:31 -05:00
1a156425c7 Merge fork/m2-textured-draw into m3-synthetic-gate
# Conflicts:
#	scripts/run_gpu_tests.py
2026-11-22 13:18:51 +01:00
e4f1093278 M2 test: sampler control (ps_m2_uoff, WRAP left / CLAMP right, CPU-predicted pixels)
With U in range, a POINT/CLAMP sampler, a POINT/WRAP one and the fallback sampler give the same pixels, so the
first pass cannot tell which sampler a draw used. The control adds 1 to U before image_sample and picks the sampler
per half through the sampler table: 4096 of 4096 pixels match the CPU prediction and 1536 differ from the plain pass.

Sampler control suggested and measured by @Vonsek in #1489.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:10:05 +01:00
72b5b7820d Merge main into test-184-image-ops
main is at 99f99890. One conflict, both sides kept:

- tests/test_shader_checks.py: main shortened the comment above TOTAL and
  counts a fourth vk_store_test shader (cs_sample_lz_int_d16: 3 -> 4) on the
  lines this branch's comment change touches. Main's comment with a clause
  for the "words" fixtures and the image_get_lod draws, main's count, and
  this branch's STORE_WORDS and GET_LOD_TESTS terms.

The automatic merges were read as well: check.py and run_gpu_tests.py run
cs_sample_lz_int_d16 through vk_store_test's "load-d16" mode next to the
"words" fixtures, and gfx10_descriptors.h still encodes the T# of the 16x4
image the same way.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 07:09:14 -05:00
497597353c Merge pull request #1521 from Luiz Neves 2026-11-22 07:08:01 -05:00
0acb7399b5 Merge pull request #1505 from DomasUrbonas 2026-11-22 07:07:56 -05:00
fdb0e84fb0 Merge pull request #1490 from Vonsek 2026-11-22 07:07:53 -05:00
db6c5790dc Merge pull request #319 from Vonsek 2026-11-22 07:07:44 -05:00
ee7c52a102 Translator: swizzled buffer V#s and ADD_TID_ENABLE (SHADER-231)
MUBUF/MTBUF accesses follow the RDNA2 ISA's swizzled buffer addressing
(8.1.5, tables 33/35/37) with the V# fields of Mesa's gfx10-rsrc.json:
SWIZZLE_ENABLE word1 bit 31, INDEX_STRIDE word3 [22:21], ADD_TID_ENABLE
word3 bit 23, element size fixed at 4 bytes. ADD_TID adds the wave lane to
the index (swizzled or linear), dword k of a swizzled access is 4 * IS bytes
after dword k - 1, and OOB_SELECT 3 with swizzle and a stride checks like
mode 0. Literal V# words fold; run-time ones use IS = 2^(swz * (3 + n)), so
IS = 1 is the linear address. A literal swizzled V# used to be Unsupported
and a run-time one was translated unswizzled.

Tests: tests/semantic/test_buffer_swizzle.py (hand-worked addresses, literal
and run-time V#s) and the GPU fixture cs_buf_swizzle.asm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:06:51 +01:00
5529697596 Merge origin/main (landed #291) into m2-textured-draw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:04:28 +01:00
f94fc77ac2 Merge main into test/ssharp-mip-fields (#319)
Conflicts were list/registration hunks in runtime/CMakeLists.txt, check.py, run_gpu_tests.py and tests/test_shader_checks.py; kept main's side and re-added vk_sampler_test, ps_ssharp and the TOTAL count.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:02:26 +01:00
41e3bc0fd0 M3 (synthetic): d3d12_m3_frame_test, MRT + D24S8 + occlusion + barriers + SRV pass, three frames in flight
Six frames through a ring of three slots, each with its own fence. Pass 1 draws
three rectangles (translator-output vs_m3/ps_m3) into an RGBA8 and an R32F
target with depth LESS/write and stencil REPLACE/EQUAL, the far one inside an
OCCLUSION query; barriers move the targets to shader/copy-read states; pass 2
samples the first target through an SRV descriptor table. Every pixel and the
exact sample count match a CPU reference. No layer change was needed. Render
passes (D3D-27) stay open. The generic shader harness skips the fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:59:57 +01:00
6d642f40f9 GPU test cs_w32_salu64: 64-bit scalar data ops and v_mad_u64_u32
s_brev_b64, s_bfe_u64/i64, s_bitset1_b64, s_flbit_i32_b64/i64, s_cmov_b32
(with s_sext_i32_i16) and v_mad_u64_u32 were added with semantic tests
only. cs_w32_salu64.asm has lane 0 of a wave32 group store one word of
each; check.py and run_gpu_tests.py expect the eight words (derived in
the .asm header), so CI runs it on llvmpipe.

tests/semantic/test_salu64_fixture.py runs the fixture on the CPU,
checks the words against values computed from the ISA definitions, and
that both GPU runners expect the same words.
2026-11-22 08:58:01 -03:00
c4e08989d7 M2 review: run_gpu_tests skips ps_m2/vs_m2, replay refuses set-0 pipelines without bind_descriptor_sets, test includes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:46:14 +01:00
5624023225 test: avoid NaN-sensitive framebuffer outputs (TEST-206) 2026-11-22 13:45:51 +02:00
2ea73b2522 GPU test for v_mad_u32_u16, v_mad_i32_i16 and v_subrev_f16
Two pixel tests for ops that had CPU checks only. ps_valu16_mad: the u16
product plus S2 wraps at 32 bits, i16 sign-extends (also op_sel high
halves), and the destination dword is overwritten. ps_valu16_subrev:
S1 - S0 in _e32 and _e64 (neg, clamp) with the destination high half
kept. Registered in check.py and run_gpu_tests.py and added as semantic
fixtures with hand constants and a Python reference.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:43:47 +01:00
810acc75fe Merge origin/main into m2-textured-draw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:42:47 +01:00
f4e0f706e1 Merge pull request #1407 from Hamza 2026-11-22 06:37:56 -05:00
923993c1c7 Merge pull request #1405 from Vonsek 2026-11-22 06:37:55 -05:00
1681f3dc1e Translator: --f16-interp-fallback reads f16 halves without PerVertexKHR (SHADER-196)
MoltenVK can't compile PerVertexKHR to MSL, so ps_interp_f16_high failed at
pipeline creation on every Mac. With --f16-interp-fallback every VS/mesh param
(and the --mesh-compute VS) also exports its two f16 halves decoded to f32,
low halves at location 29 - 2N and high halves at 30 - 2N, and a PS *_f16 read
takes them as ordinary smooth inputs. A producer skips halves that would land
on its own params; a PS whose half location is also an attribute is rejected.
The index records f16_halves on both sides.

tools/vk_subgroup_info.py reports per_vertex_inputs (false without
fragmentShaderBarycentric or on MoltenVK); make_game.py and run_gpu_tests.py
turn the flag on where it is false. Without the flag all 139 GPU-test modules
are byte-identical to main's, so NVIDIA/AMD keep the exact per-vertex path.

Apple A18 Pro, macOS 26.6.2, MoltenVK 1.4.2: ps_interp_f16_high passes, all
4096 pixels bit-exact; run_gpu_tests.py 84 pass/50 skip/1 fail -> 85/50/0
native, 112/22/1 -> 113/22/0 with wave64 emulation; ms_f16_pack passes through
--mesh-compute. Semantic suite 1194 -> 1203 OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-assisted
2026-11-22 14:32:28 +03:00
5e91fb9af2 Merge main into test-184-image-ops
main is at bb2e1842. Three conflicts, both sides kept:

- runtime/test/vk_store_test.cpp: main added the "load-d16" mode (a row of
  16-bit boundary values in the fill, for the saturating d16 loads) and
  VK_KHR_shader_fma support; this branch added the "words" mode. Both modes
  and both includes stay; main's boundary row applies to "load-d16" only, so
  "words" keeps the plain fill its expected words are derived from.
- runtime/test/shaders/check.py: main lengthened CS_STORE on the line next to
  this branch's cs_bvh32 entry. Both lines.
- tests/test_shader_checks.py: main counts cs_fma_fused (8 -> 9) on the line
  after this branch's STORE_WORDS and GET_LOD_TESTS terms. Both.

The automatic merges were read as well: vk_compute_test.cpp keeps the larger
bvh heap next to main's shader_fma code, and check.py and run_gpu_tests.py
run cs_imgload_d16 in "load-d16" next to the "words" fixtures.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 06:31:49 -05:00
4def9b297b GPU test cs_w32_int_ext: integer ops that only had CPU checks
s_absdiff_i32, s_lshl2_add_u32 (and the SCC of s_lshl1_add_u32),
s_pack_lh_b32_b16, s_mul_hi_i32, v_mul_hi_i32_i24, v_sad_u8 and v_lerp_u8 were
added with semantic tests only. cs_w32_int_ext.asm has lane 0 of a wave32
group store one result of each; check.py and run_gpu_tests.py expect the
eight words (derived in the .asm header), so CI runs it on llvmpipe.

tests/semantic/test_int_ext_fixture.py runs the fixture on the CPU, checks the
words against values computed from the ISA definitions, and that both GPU
runners expect the same words.
2026-11-22 08:29:52 -03:00
1387865c3a merge: cover wide sample inputs after D16 saturation reaches main
Use the current common image packer and its boundary-value fixture for the sample shader. Keep the merged explicit-gather paths and the headless presentation skip.
2026-11-22 12:29:49 +01:00
7f97fb7b8f Merge fork/m15-translated-draw-v2 (M1.5, #907) into pr291-on-main 2026-11-22 12:19:59 +01:00
4d75d961af Merge pull request #1394 from Vonsek 2026-11-22 06:08:11 -05:00
5e9a2dc58d Merge pull request #1393 from DomasUrbonas 2026-11-22 06:08:10 -05:00
a45d7bf397 Merge pull request #1374 from zneel 2026-11-22 06:08:05 -05:00
53f9e87620 Merge pull request #1367 from Vonsek 2026-11-22 06:08:03 -05:00
0aa78efe0f Merge pull request #1366 from undeadhuman37 2026-11-22 06:08:03 -05:00
286f5e1bbe Merge pull request #1364 from AlxcBTW 2026-11-22 06:08:02 -05:00
05922b71ff merge: retain the high half when saturating odd D16 image loads
Current main now preserves an odd load's leftover VGPR half. Apply the signed or unsigned range conversion before that shared half-word write so both behaviors survive the integration.
2026-11-22 12:06:27 +01:00