Commit Graph

28 Commits

Author SHA1 Message Date
77d59085d9 Merge pull request #3260 from Kacper Serewis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:07:05 -05:00
ec9a5780b6 Merge refreshed sampled indexing into storage indexing follow-up 2026-11-23 08:06:17 +10:00
7974b89a02 Merge official main into SHADER-605 and record independent GPU results 2026-11-22 23:05:26 +01:00
e34b0c7b78 Merge current upstream main into sampled descriptor indexing fix 2026-11-23 08:01:46 +10:00
1a53ae471c Merge pull request #3190 from whattheflop 2026-11-22 15:15:33 -05:00
ee0d2c5117 Merge refreshed sampled indexing into storage indexing follow-up 2026-11-23 06:09:15 +10:00
c901fda139 Merge upstream main into sampled descriptor indexing fix 2026-11-23 06:06:06 +10:00
7cfd20230a SHADER-605: reproduce signed-zero image stores with direct SPIR-V 2026-11-22 20:55:15 +01:00
a9dd291912 Declare dynamic storage image indexing in translated SPIR-V 2026-11-23 05:38:45 +10:00
f0a74afef9 Synchronize storage-image test readback with host reads 2026-11-23 05:38:12 +10:00
fdffac4983 Declare dynamic sampled descriptor indexing in translated SPIR-V 2026-11-23 05:08:57 +10:00
0ec464b0e1 GPU tests: bind the --pc-tail-ubo block, so 128-byte push-constant devices run the tests
With LEONIDA_PC_TAIL_UBO=1, build.py and run_gpu_tests.py translate with --pc-tail-ubo, and the test
programs (vk_compute_test, vk_store_test, vk_harness, vk_texture_test, vk_sampler_test, vk_bindless_test)
declare and push 128 bytes and, when a stage declares set 1, bind the tail block there
(runtime/test/vk_pc_tail.h: a host-visible buffer with one slot per dispatch or draw, bound as a dynamic
uniform buffer). vk_harness refuses --mesh-compute with the flag (exit 77): mesh_compute_vs.py's vertex
shader still reads its address from push constants. Without the variable nothing changes.

Step 2 of the uniform-buffer tail claimed in #1902.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:48:05 +02: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
286f5e1bbe Merge pull request #1364 from AlxcBTW 2026-11-22 06:08:02 -05:00
05eb9ca9e2 GPU tests for the MIMG ops that had none (TEST-184)
The translator handles the image atomics, image_get_resinfo, image_get_lod
and the 32-bit image_bvh_intersect_ray, but no test ran them. Six hand-written
fixtures now do, with the expected words derived in each header from the
RDNA2 ISA definition of the instruction:

- cs_imgatomic: add, sub, and, or, xor, smin, smax, umin, umax and cmpswap on
  a 2D r32 uint image. 0xfffffff0 tells the signed min/max from the unsigned
  ones, each with a case that goes the other way; cmpswap hits and misses; one
  op runs without glc; 63 lanes are off; 64 threads add to one texel.
- cs_imgatomic3d: six cases on a 4x4x4 volume, the 3D path of the translator.
- cs_resinfo: a 16x4 image with five levels: levels 0, 1 and 3 in full, then
  dmask 0x3, 0xa and 0x8.
- ps_get_lod, ps_get_lod_array: calculated LOD 1 and 3 on the two-mip
  texture, the clamped LOD held by the last level and by the sampler's
  MAX_LOD; 2 and -3 on the one-level 2D array.
- cs_bvh32: the scene of cs_bvh through the 11-dword address form.

vk_store_test gets a "words" mode for the compute ones: it also binds the
uint image and a small volume as r32ui storage images (bindings 4 and 7) and
a 16x4 five-level image behind its real T#, fills the images and prints them;
check.py holds the expected words. The other two run on vk_texture_test and
vk_compute_test as they are.

All pass on an RX 7900 XTX and a Ryzen 9 7950X3D integrated GPU (RADV, Mesa
26.3.1) and on llvmpipe, natively and with LEONIDA_W64_EMULATE=1, and are
clean under the validation layer. No translator change was needed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 05:49:32 -05:00
e256a2547c Translator: --fma khr emits OpFmaKHR for fused multiply-adds
GLSL.std.450 Fma may be split into two roundings by a driver (Vulkan
environment: inherited from OpFMul followed by OpFAdd); RDNA2 v_fma_* round
once. --fma khr (default stays glsl) emits OpFmaKHR with capability FMAKHR and
SPV_KHR_fma and lists shaderFmaFloat32 in the index. Runtime device creation
and the vk_* test programs enable VK_KHR_shader_fma when present; cs_fma_fused
tests single rounding; the mini interpreter learns OpFmaKHR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:25:37 +01:00
f5c427716f fix(translator): saturate packed integer image reads
Native gfx1036 clamps out-of-range channels from signed and unsigned RGBA32 views before packing D16 results. Exercise both limits in the existing GPU readback fixture so wrapping at either boundary is observable.
2026-11-22 11:23:18 +01:00
fd17f11a5c Translator: typed image_load fetches UINT/SINT formats from the sampled arrays (SHADER-151)
UINT/SINT image_load read the uint/sint storage arrays with OpImageRead, so
every typed load declared StorageImageReadWithoutFormat (missing on Intel
Xe-LP, #619), and read-only integer textures, which the runtime binds only in
the sampled arrays, read the fallback or past the 256-entry storage arrays.
They now fetch through uint/sint aliases of the dimension's sampled array;
a lookup miss takes the float path.

vk_store_test load fills the images before the dispatch, runs without
shaderStorageImageReadWithoutFormat and fails a module that declares it.
vk_image_fuzz no longer requires the without-format features, and binds
its UINT/SINT cases (#1087) as sampled images, as the runtime binds a
read-only texture, instead of storage-only images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 08:37:47 +00:00
6d7bb1755a Tests: shader tools honor LEONIDA_VK_DEVICE
The GPU tools picked a device with the shared ranker but never applied the
name filter the D3D12 tests have used since #861. Filter candidates through
vulkan_device_wanted in vk_device_pick.h, report a filter that matches nothing
instead of dereferencing a null device, and cover the filter cases in the
picker test. docs/testing.md no longer says the tools ignore it.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 00:02:29 -06:00
9806be2999 Tests: prefer the native Vulkan ICD over Mesa's Dozen on Windows
With the Compatibility Pack installed, Windows enumerates Mesa's D3D12
translation layer next to the real GPU, and Dozen reports DISCRETE_GPU. Every
harness used "the last discrete device wins", so it selected the wrapper and
the resulting failures looked like translator bugs (#915). One shared rank now
treats Microsoft's vendor as a translation layer, then prefers discrete over
integrated over virtual over CPU, keeping the first device on a tie. A CPU-only
test covers the reported enumeration without needing the Compatibility Pack.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-21 22:58:59 -06:00
67dd9a7b9e Merge pull request #107 from Lucas Motta
# Conflicts:
#	runtime/test/shaders/check.py
2026-11-21 14:43:18 -05:00
c2e3d811a8 tests: skip cs_imgload where image reads need a format
vk_store_test requested shaderStorageImageReadWithoutFormat for both
modes, so vkCreateDevice failed on GPUs without it (Intel Gen9) and
cs_imgstore failed too, though only image_load needs the feature.
Request it in load mode only, exit 77 when it is missing, and have
check.py list that as skipped instead of failed.
2026-11-21 16:16:27 -03:00
d51bddc84e GPU tests: skip what the device can't run instead of failing (fixes #88 points 2-3)
vk_store_test exits 77 when the GPU lacks format-less storage image read/write (Intel Gen9), and check.py
reports it as SKIP. run_gpu_tests.py catches up with check.py: ps_flat (drawn with vs_ids), ps_legacy_mul,
and ps_bitmask_perm judged on lanes 0-31 only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 14:16:04 -05:00
6f486f75d3 Merge pull request #13 from eIBart0 2026-11-21 11:46:54 -05:00
e72e13ecfe Vulkan tests: fix AMD vk_store_test bindings, add subgroupSizeControl, add GPU test runner 2026-11-21 10:55:05 -03:00
4146672f58 Vulkan tools: fix builds on Linux 2026-11-21 02:35:54 -03:00
ec83153070 Translator: typed image_load (uint/sint views by T# FORMAT); GPU-checked
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 22:22:34 -05:00
e8d9227ac2 Typed image stores GPU-checked (vk_store_test: float/uint/sint views via T# FORMAT)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 21:51:17 -05:00