Commit Graph

12 Commits

Author SHA1 Message Date
2c3b42ec48 Exercise pipeline input protection against hard links in CTest
Use a real hard link when the test filesystem supports it. Check that the index and skip file hashes survive rejected output paths. The test passes on Debian and fails when equivalent() is replaced with lexical normalization alone.

AI-assisted (Codex).
2026-11-22 22:29:12 -03:00
921a959b72 Merge upstream main into pipeline checker input protection
Keep both the filesystem header for identity checks and the upstream type traits for the large-module budget. Preserve the input checks and CLI coverage.

AI-assisted (Codex).
2026-11-22 22:14:33 -03:00
92d53a0cd6 Merge pull request #2927 from bobcatchris 2026-11-22 15:13:16 -05:00
00c01a198f fix(runtime): protect pipeline checker inputs from output aliases
Reject cache, stats and snapshot paths that point to the shader index or skip list before opening them. Check file identity so case differences and filesystem links cannot hide an alias.
2026-11-22 17:01:53 -03:00
3ca929037b vk_pipeline_check: parse floating-point CLI values without from_chars (BUILD-822) 2026-11-22 13:40:41 -06:00
3917298d1b vk_pipeline_check: support --pc-tail-ubo set-1 layouts and 128-byte push-constant devices
vk_pipeline_check previously created one VkPipelineLayout with a hardcoded 144-byte push-constant range and set 0 only (without checking vkCreatePipelineLayout's result). On a 128-byte push-constant device (AMD Windows RDNA2 iGPUs, some Intel Arc drivers) that violates VUID-VkPushConstantRange-size-00298, and every --pc-tail-ubo shader declaring set 1 fails pipeline creation with VK_ERROR_UNKNOWN / VUID-VkComputePipelineCreateInfo-layout-07988.

Parse push_constant_bytes and pc_tail.bytes from index.json (with strict from_chars validation, tested in check_vk_pipeline_cli.cmake), skip shaders whose required push-constant size exceeds props.limits.maxPushConstantsSize, add set 1 (UNIFORM_BUFFER_DYNAMIC at binding 0), and create one pipeline layout per distinct (push_bytes, has_pc_tail) needed by the selected shaders within the device limit.

Claimed in #2300.

Co-Authored-By: Gemini 4 Neon <noreply@google.com>
2026-11-22 19:11:14 +02:00
b1d7e41074 Fix the runtime build after the merge round: custom border colour chain, lds_bytes CLI check
- d3d12_vulkan_device.cpp, vk_test_device.h: #760 chained VkPhysicalDeviceCustomBorderColorFeaturesEXT onto
  enable13, which #1706 replaced with leonida::Vulkan13Features; it goes at *v13.next() like the other later
  feature structs. The runtime and the GPU test harness didn't compile.
- check_vk_pipeline_cli.cmake: #1958's lds_bytes cases matched "malformed JSON"; the index parser reports where it
  stopped ("... at byte 37"), which the check now matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:14:21 -05:00
e52eb24aa8 Merge pull request #1958 from Capital 2026-11-22 10:39:46 -05:00
ced200b263 [BUILD-546] Check compute workgroup memory before pipeline compilation 2026-11-22 16:15:45 +01:00
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
9eaddc92be vk_pipeline_check_cli: run the tool through CMAKE_CROSSCOMPILING_EMULATOR
CTest applies CMAKE_CROSSCOMPILING_EMULATOR only to tests whose command is a
target; the script test runs the host CMake, so the cross-build/Proton workflow
in docs/testing.md would execute the tool directly, without Wine. Pass the
emulator list as -DRUNNER and prepend it to both execute_process commands, the
same pattern as check_loaded_async.cmake.
2026-11-22 17:04:38 +03:00
f3a4450592 vk_pipeline_check: reject malformed option values (TEST-250) 2026-11-22 16:43:50 +03:00