Commit Graph

33 Commits

Author SHA1 Message Date
227087d250 Fix what the merge round broke: vk_pipeline_check --isolate-batch, its CLI test, a tbuffer format example
- vk_pipeline_check.cpp: #1826's --isolate-batch parsed with the val() helper #1735 replaced, so the checker
  didn't build; it now uses number() like the other options.
- check_vk_pipeline_cli.cmake (#1735) matched "malformed JSON"; #1847's index parser names the file and position
  ("index.json: expected '{' at byte 0"), which the check now matches.
- test_tbuffer_store: BUF_FMT_8_UINT stopped being an unsupported example once #1871 added the 8/16-bit UINT/SINT
  formats; it uses BUF_FMT_8_USCALED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:06:43 -05:00
613d90052b Merge pull request #1847 from SirAmong 2026-11-22 09:48:43 -05:00
5a3aca054c Merge pull request #1826 from SirAmong 2026-11-22 09:48:29 -05:00
5c66e611f0 vk_pipeline_check: a missing, unreadable or empty index.json is an error, not an empty corpus (TEST-257)
read_index did not check that the stream opened and returned an empty index,
with no error, for an empty input, so a wrong directory exited 0 after checking
nothing. Both now set the error (exit 2, before Vulkan is loaded); a valid {}
stays an intentionally empty index. tests/test_vk_pipeline_check_index.py covers
missing, empty, whitespace-only, malformed and {} (no GPU needed).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 09:31:48 -05:00
e0416ce29d vk_pipeline_check: --isolate runs batches in child processes and records a module that kills the driver as failed (TEST-248)
--isolate (POSIX only; an error on Windows) runs the check in child processes
over --isolate-batch modules at a time. A child killed by a signal has its
batch bisected to the module, which is reported as MODULE CRASH, counted as a
failed pipeline and makes the exit status 1; the rest is checked as usual.
Children share cache.bin one after another (atomic saves). The test hook
VK_PIPELINE_CHECK_SIMULATE_CRASH=<name substring>[:SIGNAL] raises a signal
before a matching pipeline is created, so tests/test_vk_pipeline_check_isolate.py
checks this with five hand-assembled compute shaders and no crashing driver.
Normal (non-isolated) output is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 09:25:47 -05:00
f3a4450592 vk_pipeline_check: reject malformed option values (TEST-250) 2026-11-22 16:43:50 +03: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
2d93239c82 Merge pull request #912 from nicolas 2026-11-22 01:37:55 -05: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
f53fc3fa48 Merge upstream large-module scheduling with cache feedback 2026-11-21 22:56:39 -07:00
6d6301c1b5 Merge pull request #919 from bobcatchris 2026-11-22 00:33:09 -05: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
bb6bb741fd Compile large Vulkan shader modules exclusively 2026-11-22 01:27:49 -03:00
53d2c6126b Report application-cache feedback for compiled Vulkan pipelines 2026-11-21 21:22:43 -07:00
78c5b429bc Merge pull request #795 from DANISBR1 2026-11-21 22:37:44 -05:00
f577bf0318 vk_pipeline_check --stats: the driver's statistics for each translated shader
vk_pipeline_check <spirv dir> --stats FILE enables VK_KHR_pipeline_executable_properties, creates the
pipelines with CAPTURE_STATISTICS and writes, for the executable that runs each translated shader (not
the partner stub's), every statistic the driver reports as CSV rows name,stage,statistic,value. On RADV:
instructions, VGPRs, SGPRs, spills, scratch size, waves per SIMD, and more.

scripts/shader_stats.py <stats.csv> <disasm dir> [--details] compares them with the original RDNA
listings: code growth, VGPRs against the highest VGPR the original uses, and which shaders use scratch or
spill (a register file that went to memory, e.g. through v_movrels with an unbounded index). Over the
corpus it says how many shaders compile badly.

RX 5700 XT (RADV), the repository's test shaders: 47 pipelines, no scratch or spills in any.
New tests/test_shader_stats.py (standard library only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 21:06:49 -06:00
066df86857 Vulkan: clamp pipeline check slice before adding count 2026-11-22 04:03:08 +01:00
6b101b24e2 Fail pipeline checks when shader modules or pipelines fail 2026-11-21 18:46:11 -07:00
e27749fcaf Preserve the last complete Vulkan pipeline cache checkpoint 2026-11-21 17:29:54 -07:00
d937b7f092 vk_pipeline_check: read subgroup_size null (--wave64-emulate: any size) as no required size
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 18:26:07 -05:00
6a0a3ec541 Merge pull request #113 from eIBart0 2026-11-21 15:47:56 -05:00
ce4e26cc14 Merge pull request #113 from eIBart0 2026-11-21 15:17:51 -05:00
c2099b3c02 Runtime: report pipelines compiled without the requested subgroup size 2026-11-21 20:12:23 +00:00
c9924321f2 Merge pull request #113 from eIBart0
# Conflicts:
#	runtime/test/vk_pipeline_check.cpp
2026-11-21 14:42:19 -05:00
ba191bd6ce Runtime: fail cleanly on malformed JSON in vk_pipeline_check JsonParser 2026-11-21 19:30:29 +00:00
8cfbdc21cc Runtime: wake vk_pipeline_check watchdog via condition_variable on completion 2026-11-21 19:29:37 +00:00
428e250b84 Runtime: compile real graphics pipelines (ps/vs/ms/gs) in vk_pipeline_check
- Pair ps/vs/ms/gs shaders with partner stubs from <spirv>/stubs/ and compile
  real pipelines via vkCreateGraphicsPipelines with Vulkan 1.3 dynamic
  rendering (color attachments from outputs, depth attachment when writes_depth,
  VK_EXT_mesh_shader for ms, vertex input bindings for vs).
- Enable only optional extensions needed by the selected shaders; report
  shaders missing required device features or stubs as skipped rather than failed.
- Add --stage all|cs|graphics (--compute-only / --graphics-only), per-stage
  module/pipeline/skip/timing reporting, and guard VK_KHR_maintenance8 for
  older Vulkan headers. Preserves PR #28 --jobs, cache, --start/--count, and SLOW.
2026-11-21 16:18:02 -03:00
352300704d Runtime: skip oversized modules in vk_pipeline_check, and record the corpus pass 2026-11-21 19:17:43 +00:00
0aa9840021 vk_pipeline_check: compile on --jobs threads, name compiles stuck past 60 s, resume from the cache (saved every 10 min), --start/--count, line-buffered failures
A full-corpus run stalled for hours inside one compute pipeline with its failure lines stuck in stdout's buffer and no cache written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 12:12:27 -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
4b76bfb196 vk_pipeline_check: create every translated module (and every compute pipeline) on the real driver; optional pipeline cache
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 22:20:05 -05:00