Commit Graph

1615 Commits

Author SHA1 Message Date
4c414d1216 tools: ps_oracle.py runs hand-written RDNA2 pixel-shader ISA on AMD GPUs
hw_oracle launches compute kernels only. vk_harness can now write a
pipeline's VK_KHR_pipeline_binary data and build a pipeline from it
(VKH_BINARY_OUT / VKH_BINARY_IN). ps_oracle.py puts assembled ISA in
place of _amdgpu_ps_main in the driver's PAL ELF, raises the pixel
stage's register counts in the msgpack metadata, optionally changes
other metadata entries, and draws with it, reading every pixel's mrt0
words back.

Checked on gfx1036 (driver 26.10.1): v_interp of a varying and the
parameter words P0 / P10 come back as expected. Tests in
tests/test_ps_oracle.py, docs in docs/shader_validation.md.

AI-assisted.
2026-11-22 20:15:34 +01:00
f2d7501f1d Merge pull request #2308 from AREA52 Agent 2026-11-22 11:44:03 -05:00
df8de6a1fc Merge pull request #2296 from João Ramos 2026-11-22 11:43:55 -05:00
ae21dddaa6 Merge pull request #2290 from 1TrickOmen 2026-11-22 11:43:51 -05:00
07a6d1c5ae Merge pull request #2286 from Matheus Gomes 2026-11-22 11:43:48 -05:00
72758b9c5b Merge pull request #2270 from Tim Elery
# Conflicts:
#	docs/design.md
2026-11-22 11:43:39 -05:00
4c28f269ec Merge pull request #2264 from SirAmong 2026-11-22 11:43:34 -05:00
8f1370ce4a Merge pull request #2260 from Linnard Alex Brown Jr.
# Conflicts:
#	docs/design.md
2026-11-22 11:43:33 -05:00
873a952a37 Merge pull request #2239 from itsRevela 2026-11-22 11:43:15 -05:00
3fd09d4ecd Merge pull request #2232 from Jolymmiles 2026-11-22 11:43:11 -05:00
5fdb55613d Merge pull request #2226 from SirAmong 2026-11-22 11:43:06 -05:00
693b8c63af Merge pull request #2209 from Vonsek 2026-11-22 11:42:51 -05:00
617fb06127 Merge pull request #2199 from edupode 2026-11-22 11:42:42 -05:00
b3a5411ce0 Merge pull request #2186 from fearkov
# Conflicts:
#	docs/design.md
2026-11-22 11:42:36 -05:00
2d848a33ee Merge pull request #2167 from Alex Arenas 2026-11-22 11:42:25 -05:00
d159969a1b Merge pull request #2162 from Cozma 2026-11-22 11:42:23 -05:00
430d046487 Merge pull request #2151 from Faterek
# Conflicts:
#	docs/design.md
2026-11-22 11:42:17 -05:00
e3c972d0d5 Merge pull request #2145 from KanameS 2026-11-22 11:42:13 -05:00
cdb907aa8f Merge pull request #2127 from AwkGrep256
# Conflicts:
#	docs/design.md
2026-11-22 11:42:03 -05:00
b903812991 Merge pull request #2126 from pwu2775-dev 2026-11-22 11:42:01 -05:00
7360583abd Merge pull request #2122 from jaybeebabageyus 2026-11-22 11:41:59 -05:00
ac7e1f9d0b Merge pull request #2116 from swam122yam-glitch 2026-11-22 11:41:55 -05:00
d3b2262635 Merge pull request #2114 from Vonsek 2026-11-22 11:41:55 -05:00
6f77e39793 Merge pull request #2112 from SirKingg 2026-11-22 11:41:54 -05:00
c97e961387 Merge pull request #2111 from Thatters 2026-11-22 11:41:53 -05:00
388a4723c2 Merge pull request #2103 from requiemsnkrp 2026-11-22 11:41:49 -05:00
95ac207b7b Merge pull request #2099 from Luis Baker 2026-11-22 11:41:47 -05:00
04a864baef Merge pull request #2085 from emirduran707 2026-11-22 11:41:37 -05:00
2fe08d7e18 Merge pull request #2084 from Luis Baker 2026-11-22 11:41:37 -05:00
61d5397910 Merge pull request #2070 from jaybeebabageyus 2026-11-22 11:41:29 -05:00
3d1a9889df Merge pull request #2049 from Shrey Ratna 2026-11-22 11:41:12 -05:00
817de3de95 Merge pull request #2041 from fearkov 2026-11-22 11:41:08 -05:00
1e24a98cce Merge pull request #2032 from Alex Arenas 2026-11-22 11:41:04 -05:00
68733d6606 Merge pull request #2021 from jaybeebabageyus 2026-11-22 11:41:02 -05:00
9b138453e8 Merge pull request #2001 from Rafael 2026-11-22 11:41:00 -05:00
1241d87e4f Merge pull request #1991 from TheHoracio 2026-11-22 11:40:59 -05:00
4b564a0943 Merge pull request #1937 from SHAURYASANYAL3 2026-11-22 11:40:49 -05:00
067e0240bd Merge pull request #1935 from Tao Battarel 2026-11-22 11:40:49 -05:00
72b6218983 Merge pull request #1916 from cobalt-pebble-804 2026-11-22 11:40:47 -05:00
24796f5284 Merge pull request #1886 from Claude 2026-11-22 11:40:44 -05:00
5cf0a1743d Merge pull request #1880 from Vonsek 2026-11-22 11:40:43 -05:00
867be74659 Merge pull request #1742 from RaveN499 2026-11-22 11:40:38 -05:00
fc2ee62c98 Merge pull request #1683 from requiemsnkrp 2026-11-22 11:40:37 -05:00
ea00498d3f Merge pull request #664 from WHOISJARDAS 2026-11-22 11:40:30 -05:00
7812487acc d3d12_vulkan_device: answer Intel integrated OPTIONS1 lanes per generation (D3D-280)
Meteor Lake (Xe-LPG) hosts answer 8..32 while the D3D-121 rule pins 16..16 for every
Intel integrated GPU; keep the measured 16..16 pin on pre-Xe-LPG lines (Tiger Lake
regression-checked locally) and keep the Vulkan range on Xe-LPG+ device-ID ranges
(Meteor/Arrow Lake 0x7d40-0x7dc5, Lunar Lake 0x64a0-0x64b6).

Fixes D3D-280.
2026-11-22 17:38:00 +01:00
2a1bd0399d vk_pipeline_check: a module is in flight from vkCreateShaderModule on, tagged module or pipeline
Review of #2111 (@Pipodi): the in-flight table got its entry only just before vkCreateComputePipelines /
vkCreateGraphicsPipelines, so a thread busy in vkCreateShaderModule (or a large module there, alone behind
compile_gate) was invisible: the watchdog never named it, and --inflight-file couldn't name a module that died there.

- The entry is made once the worker holds compile_gate, before vkCreateShaderModule, with phase "module"; it becomes
  "pipeline" when the pipeline is created, and is removed on every path out of the loop (a pipeline, a skip, a failed
  module). A module over --large-module-bytes writes the file when it enters the driver, not only at its pipeline.
- --inflight-file lines are "name<TAB>phase"; make_game.py reads the name.
- The watchdog says "still creating the shader module of X" or "still compiling X".

Waiting on compile_gate is not in the table: that thread isn't in the driver.

Tested on Windows 11 Pro 25H2, MSVC 14.51 + Ninja, RTX 5070 Ti / 621.24: the crash end-to-end through
make_game.pipelines on 62 real compute modules (skipped, the other 61 checked); the in-flight file at a simulated
crash reads "<module>\tpipeline" and is empty after a clean pass (62/62). tests/test_make_game_pipelines.py writes the
tab format; all 14 test_make_game*.py files pass. No new warnings. No game data. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:34:50 -05:00
a28493ba8f runtime: support multiple simultaneous manually mapped static-TLS modules 2026-11-22 17:34:35 +01:00
72d7e52dfa Translator: a mask copied to a VGPR respects EXEC (SHADER-21 part 2, #210) 2026-11-22 16:33:52 +00:00
989877d1e0 fix(vulkan): fail capture readback when the fence wait fails
Only copy the mapped capture buffer after a successful fence wait. Inject a failure in the synchronization test and verify that the caller's pixel and metadata outputs are unmodified.
2026-11-22 13:33:33 -03:00
fbe50b23fd rdna2spirv: align swizzled buffer addressing with native RDNA2 hardware (SHADER-343)
Measure MUBUF/MTBUF swizzled buffer addressing (V# SWIZZLE_ENABLE,
ADD_TID_ENABLE, INDEX_STRIDE, OOB_SELECT, multi-dword and typed
accesses, atomics, 32-bit offset wrap) natively on RDNA2 (gfx1036,
wave32 and wave64) via tools/buffer_swizzle_probe.py, and fix all six
observed silicon divergences in tools/rdna2spirv.py:

- idxen=1 ignores ADD_TID_ENABLE (both address and bounds).
- SWIZZLE_ENABLE=1 with idxen=0 and ADD_TID_ENABLE=0 stays linear and
  OOB_SELECT 3 remains RAW.
- Multi-dword raw accesses step by +4*IS only in scratch-swizzle mode
  (SWIZZLE_ENABLE=1, idxen=0, ADD_TID_ENABLE=1); indexed swizzle
  (idxen=1) steps linearly by +4 bytes even across IS boundaries.
- Scratch-swizzle mode suppresses typed formats > 4 bytes (MUBUF/MTBUF)
  and 8-byte buffer_atomic_*_x2 even under OOB_SELECT 2 (formats <= 4B
  execute normally); indexed swizzle executes them linearly.
- OOB_SELECT 3 with active swizzle and stride != 0 checks
  (index + soffset) >= num_records or off + payload > stride.
- off = uint32(voff + inst_offset) wraps at 32 bits before bounds
  checking, while RAW mode 3 uint64(off) + uint64(soffset) does not.

Update semantic tests, cs_buf_swizzle fixture expectation (word 4:
0x5eed0028 -> 0x5eed000c), unit tests, and docs/design.md /
docs/shader_validation.md.
2026-11-22 08:32:34 -08:00