Repository navigation
rdna2spirv: buffer_load_{u,s}{byte,short}, GFX10_FORMAT_8_UINT, and global_atomic_fmin/fmax - #1968
SweatierKey wants to merge 1 commit into
Conversation
…l_atomic_fmin/fmax
427c137 to
71f6358
Compare
|
Tested 427c137 on Intel Arc Graphics (Meteor Lake-H iGPU, Xe-LPG, 0x8086:0x7d55), Intel driver 32.0.101.6127, Vulkan 1.3.295, Windows 11 Pro 26H2 (build 26300), llvm-mc 23.1.6 (native, conda-forge): pass, no regression.
The PR adds no GPU test, so this checks that the translator change breaks nothing on a 32-wide Intel device, not the new loads and atomics on hardware. The branch has moved since (now 71f6358); I have not rerun that head. |
|
Tested
The new sub-dword loads, Tools: llvm-mc 23.1.6 and SPIRV-Tools from conda-forge on Windows. No game files. AI-assisted (Claude Code). |
|
Checked on the 52
AI-assisted. |
# Conflicts: # docs/design.md
|
Already merged into |
# Conflicts: # docs/design.md
… rule (buffer_store_short) left (PROC-120) Recounted with main 4947579 on the 1.0.2.1 package (counts only): 52/52 unpack, 42 clean and 10 with invalid words in the disassembly, 51 translate and pass spirv-val. The four rules embedded_shaders.md listed are three since 427c137 (ItsNotRexed#1968); Box16Rehydration stops at buffer_store_short (ItsNotRexed#1864). d3d12_vulkan.md and the docs index quoted 41/42 and four rules in seven places. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Update docs/embedded_shaders.md §4 and §5 and related references in docs/d3d12_vulkan.md to reflect current main: 51 of 52 XboxBvhBuilder.dll compute shaders now translate and pass spirv-val since ItsNotRexed#1871 (GFX10_FORMAT_8_UINT) and ItsNotRexed#1968 (427c137: global_atomic_fmax/fmin and buffer_load_ushort) landed. Only Box16Rehydration remains blocked, awaiting buffer_store_short (ItsNotRexed#1864). Claim: ItsNotRexed#2300 (comment)
… rule (buffer_store_short) left (PROC-120) Recounted with main 4947579 on the 1.0.2.1 package (counts only): 52/52 unpack, 42 clean and 10 with invalid words in the disassembly, 51 translate and pass spirv-val. The four rules embedded_shaders.md listed are three since 427c137 (#1968); Box16Rehydration stops at buffer_store_short (#1864). d3d12_vulkan.md and the docs index quoted 41/42 and four rules in seven places. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Update docs/embedded_shaders.md §4 and §5 and related references in docs/d3d12_vulkan.md to reflect current main: 51 of 52 XboxBvhBuilder.dll compute shaders now translate and pass spirv-val since #1871 (GFX10_FORMAT_8_UINT) and #1968 (427c137: global_atomic_fmax/fmin and buffer_load_ushort) landed. Only Box16Rehydration remains blocked, awaiting buffer_store_short (#1864). Claim: #2300 (comment)
Follow-up to #1813 covering the four remaining translator rules needed by the 10 untranslated
XboxBvhBuilder.dllcompute shaders (claim: #1902 (comment)).Changes
tools/rdna2spirv.py,Gen.buffer_load_sub):buffer_load_ubyte,buffer_load_sbyte,buffer_load_ushort, andbuffer_load_sshortusingbuffer_address(..., elem=1|2)for exact element-endOOB_SELECTchecks, zero/sign extension to 32 bits, dword-crossing 16-bit merge ataddr % 4 == 3without over-reading past the buffer, and inactive-lane preservation. UnblocksBox16Rehydration,Box32Rehydration,ReloadTriangles.GFX10_FORMAT_8_UINT(code 5) (tools/rdna2spirv.py,Gen.FORMATS): 1-byte unsigned integer format fortbuffer_load_format_*andbuffer_load_format_*(withDST_SELinteger 1 and invalid V# format-0 suppression). UnblocksLeafRehydration.tools/rdna2spirv.py,Gen.global_atomic_float):global_atomic_fminandglobal_atomic_fmaxlowered to a structuredOpAtomicCompareExchangeCAS loop with GLSL.std.450NMin/NMax(no shader float-atomic Vulkan extension required; NaN returns the non-NaN operand,-0.0 < +0.0, inactive lanes do not touch memory and keepvdst). UnblocksBuildKDOP,LoadInstances,ReloadProcedurals,LoadProceduralGeometry,LoadTriangles,PT_LoadInstances.tests/semantic/spirv_mini_interp.py): ignoreOpLoopMergeat runtime (already checked structurally bycheck_structure()) and permit bounded backward branches (10,000 back-edge cap) so structured CAS loops execute on the CPU.tests/semantic/test_buffer_load_sub.py, extendedtests/semantic/test_global_atomics.py, and documented the contract rows indocs/design.md.Testing (CPU / synthetic only, no game files, no GPU)
python3 -m compileall -q make_game.py tools tests: OKtests/semantic/test_global_atomics.py: 12/12 OK (value grid incl. NaN/±0/±inf, multi-lane CAS contention, inactive lane, offsets,offaddressing,glc/non-glc, first-read analysis)tests/semantic/test_buffer_load_sub.py: 9/9 OK (all byte offsets 0..7 incl. dword-crossing 16-bit, OOB modes 0/1/2/3, inactive lane,tbuffer_load_format_x/buffer_load_format_xyzwGFX10_FORMAT_8_UINT)tests/semantic/test_buffer_load_format.py(27/27),test_buffer_swizzle.py(7/7),test_global_atomics_x2.py(4/4),test_interp_merge_check.py(4/4),tests/test_isa_coverage.py,tests/test_shader_index.py,tests/test_docs_links.py: all OKspirv-as --target-env vulkan1.2+spirv-val --target-env vulkan1.2 --allow-offset-texture-operand(SPIRV-Tools v2025.5): all 6 synthetic fixtures pass (native and--wave64-emulate).AI-assisted.