Commit Graph

6308 Commits

Author SHA1 Message Date
f0703cdef4 rdna2spirv: check high 32 bits for buffer offset fit to avoid NVVM crash
In Gen.buffer_address (tools/rdna2spirv.py), emit
`OpShiftRightLogical %ulong wide %c64_32` followed by
`OpIEqual %bool hi_w %cl0` instead of
`OpULessThanEqual %bool wide %clffffffff`.

NVIDIA 580.82.07 NVVM aborts pipeline creation (`NVVM compilation failed: 3`,
VkResult -13) on the unsigned 64-bit compare when a literal V# folds `wide`
to `0 + idx * stride` (reported and A/B-tested on L4 by @kevincommits in
ubiquitarianism/leonida#1608#issuecomment-7208330785). Over uint64,
`(wide >> 32) == 0` is mathematically identical to `wide <= 0xFFFFFFFF`.

Since lower_addr64 (SHADER-423), the 64-bit compare still reaches the driver
with --int64-addresses, and by default in any module the lowering leaves in
its Int64 form (a 64-bit scalar op such as s_lshl_b64 elsewhere in the
shader). Where the lowering does apply, the new form lowers to a high-word
`== 0` test, without the pair compare's redundant low-word
`<= 0xFFFFFFFF` term.

tests/semantic/test_buffer_offset_wrap.py runs every access (including the
exact 32-bit boundary cases: `0xFFFFFFFC` dword, `0xFFFFFFFF` byte vs
`0x1_0000_0000`) three ways: lowered (default), --int64-addresses, and
default with Int64 kept. It checks that no compare with the 32-bit limit is
emitted in any of them (raw and after spirv_opt.optimize), that the Int64
forms test `(wide >> 32) == 0`, and that the modules pass spirv-val when it
is on PATH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 09:09:38 +10:00
dd60cba733 Merge remote-tracking branch 'origin/main' into x64-recomp-vzeroupper
# Conflicts:
#	tests/test_x64_recomp.py
2026-11-29 20:30:08 +01:00
35390e7228 Merge pull request #1624 from xel1uz/fix/sad-arg-guards
sad_diff: reject a zero or negative --max-ops and --programs
2026-11-29 20:02:32 +01:00
cf0557ffc3 Merge pull request #909 from markankamaransheogarat-sys/ubiq/spirv-tool-tree-cleanup
SPIRV-TOOL-TREE-CLEANUP: rdna2spirv, make_game: terminate spirv-as/val children on abort and sweep stale .spirv-*.tmp
2026-11-29 20:01:11 +01:00
b8346588de Merge pull request #1621 from xel1uz/fix/valu-arg-guards
valu_int_diff: report a bad --max-ops/--programs as a usage error
2026-11-29 20:00:52 +01:00
cf6e559219 Merge pull request #825 from trigger337/fix/file-mode-probe-cleanup
file_mode: restore write permission before probe removal (FILE-MODE-PROBE-CLEANUP)
2026-11-29 20:00:35 +01:00
3be7be0110 Merge pull request #889 from trigger337/fix/world-index-stage-cleanup
world_index: restore write mode before unlink on replace failure and publish mode (WORLD-INDEX-STAGE-CLEANUP)
2026-11-29 19:59:38 +01:00
e5042dd503 Merge pull request #838 from trigger337/fix/world-lights-stage-cleanup
world_lights_paths: restore write mode before unlink on replace failure and publish mode (WORLD-LIGHTS-STAGE-CLEANUP)
2026-11-29 19:59:29 +01:00
16801256a7 Merge pull request #836 from trigger337/fix/world-census-stage-cleanup
world_census: restore write mode before temporary directory cleanup in _staged_json (WORLD-CENSUS-STAGE-CLEANUP)
2026-11-29 19:59:22 +01:00
423ccd7a95 Merge pull request #1669 from xel1uz/fix/sandbox-scene-atomic-out
sandbox_scene: write --out atomically
2026-11-29 19:59:14 +01:00
bcbbd9a9c7 Merge pull request #1601 from xel1uz/fix/amd-swizzle-argument-guards
amd_swizzle: reject impossible sizes, unusable offsets and empty results
2026-11-29 19:59:06 +01:00
2a4b878356 progress_dashboard: reject non-JUnit XML reports
AI-assisted with Codex.
2026-11-29 21:54:11 +03:00
7c330c76db Merge pull request #2236 from zmasi/fix/dstorage-multilevel-bcpack-fit
build_dstorage_history: fit missing BPTC history slots across multi-level sibling mips (DSTORAGE-MULTILEVEL-MIP-FIT)
2026-11-29 19:37:07 +01:00
377c45a336 Merge pull request #1530 from IlyassRS3/fix/sampler-source-census-dataflow-io
sampler_source_census: fix V#/pointer/SMEM/v_mov dataflow and harden JSON I/O (SAMPLER-SOURCE-CENSUS-DATAFLOW-AND-IO)
2026-11-29 19:37:01 +01:00
0cea8abaeb Merge pull request #899 from trigger337/fix/manifest-verifier-stage-cleanup
manifest_verifier: restore write mode before unlink on replace failure and publish mode (MANIFEST-VERIFIER-STAGE-CLEANUP)
2026-11-29 19:36:55 +01:00
4d531de078 Merge pull request #855 from trigger337/fix/bvh-slot-check-stage-cleanup
bvh_slot_check: restore write mode before unlink on replace failure and publish mode (BVH-SLOT-CHECK-STAGE-CLEANUP)
2026-11-29 19:36:48 +01:00
3e4b15ccd3 Merge pull request #834 from trigger337/fix/world-names-stage-cleanup
world_names: restore write mode before unlink on replace failure and publish mode (WORLD-NAMES-STAGE-CLEANUP)
2026-11-29 19:36:43 +01:00
4ccd9cbfbc Merge pull request #832 from trigger337/fix/dds-png-stage-cleanup
dds_png: restore write mode before unlink on replace failure in main (DDS-PNG-STAGE-CLEANUP)
2026-11-29 19:36:37 +01:00
8b27343069 Merge pull request #816 from trigger337/fix/world-build-stage-cleanup
world_build: restore write mode before unlink on replace failure in _write_json_atomic (WORLD-BUILD-STAGE-CLEANUP)
2026-11-29 19:36:31 +01:00
5248a47e40 Merge pull request #1668 from xel1uz/fix/gen-gdk-runtime-classes-atomic-out
gen_gdk_runtime_classes: write --out atomically
2026-11-29 19:28:24 +01:00
157038f7b0 Merge pull request #1648 from xel1uz/fix/feature-scan-atomic-out
feature_scan: write --out atomically and keep the existing report on failure
2026-11-29 19:28:18 +01:00
ac5da9db8a Merge pull request #1623 from xel1uz/fix/buffer-arg-guards
buffer_format_fuzz: reject a negative --budget
2026-11-29 19:28:12 +01:00
fcf7b7d406 Merge pull request #1619 from xel1uz/fix/f16misc-arg-guards
f16misc_diff: reject a zero or negative --max-ops and --programs
2026-11-29 19:28:05 +01:00
65b9afc087 Merge pull request #1453 from Dashhhhhhhh/fix/world-drawable-verify-case-archive
world_drawable_verify: one archive under another case is the same source (WORLD-DRAWABLE-VERIFY-CASE-ARCHIVE)
2026-11-29 19:28:00 +01:00
aacc89a1c3 Merge pull request #1395 from Diegobecker07/old-9961-skip-asserts
runtime: LEONIDA_SKIP_ASSERTS steps over guest asserts without a trace (OLD-9961, RT-526)
2026-11-29 19:27:49 +01:00
c7ad7ef90b Merge pull request #451 from EdenBendheim/ubiq/ttpf-zero-byte-dds-resume
Repair zero-byte DDS files on TTPF export resume
2026-11-29 19:27:26 +01:00
eff40832ef Merge remote-tracking branch 'refs/remotes/mandy/main' into fix/rendering-correctness
# Conflicts:
#	runtime/shims/d3d12_com.cpp
#	runtime/shims/d3d12_vulkan_device.cpp
#	runtime/src/command_list.h
#	runtime/src/vulkan_replay.h
#	runtime/test/gfx10_descriptors_test.cpp
2026-11-29 11:51:06 -05:00
59ce2c87b0 Merge origin/main into carry/pr-65
tools/rdna2spirv.py: main's d16 "destination is also read" check (now
DST_ALSO_READ, plus buffer_load_format_d16_hi_x) gains the PR's flat_load_
prefix. docs/design.md: main's 8/16-bit global row is kept and the PR's
"Flat memory" row follows it.

Co-authored-by: tiagonogueiraa-bit <360313680+tiagonogueiraa-bit@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:23:56 +01:00
51445af783 Merge origin/main into carry/pr-282
Conflict in the x_memory_order docstring (tools/rdna2spirv.py): main already
ignores ds_nop (80417b9c4), so the PR's part still new is ordering
image_sample, image_gather4 and image_bvh; its docstring is kept. The PR's
parity test probe gains x_one_lane, which main's Gen.x_memory_order reads.

Co-authored-by: totonii <totonicontato@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:14:37 +01:00
fd5ad13bd9 Merge pull request #2154 from whoalin1/shader-stage-cache-crossroot
rdna2spirv: cache shader stages per carve root
2026-11-29 16:44:05 +01:00
7599556c37 awc_manifest: publish mode on Windows (AWC-MANIFEST-STAGE-CLEANUP)
agent: yes
AI-assisted: yes
2026-11-29 18:24:24 +03:00
eeb967c89e shader_disasm: restore write mode before unlink on replace failure and publish mode (SHADER-DISASM-STAGE-CLEANUP)
Apply published_mode(out_file) to temporary listing before atomic replacement,
and restore write permission (0o600) before unlinking in finally block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.

agent: yes
AI-assisted: yes
2026-11-29 18:24:20 +03:00
ca8a627c5c bary_fallback_gs: restore write mode before unlink on replace failure and publish mode (BARY-FALLBACK-GS-STAGE-CLEANUP)
Apply published_mode(asm/spv) to temporary files before atomic replacement,
and restore write permission (0o600) before directory cleanup in exception block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.

agent: yes
AI-assisted: yes
2026-11-29 18:24:17 +03:00
912d15cc7a mesh_compute_vs: restore write mode before unlink on replace failure and publish mode (MESH-COMPUTE-VS-STAGE-CLEANUP)
Apply published_mode(spv) to temporary staged SPV before atomic replacement,
and restore write permission (0o600) before directory cleanup in exception block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.

agent: yes
AI-assisted: yes
2026-11-29 18:24:15 +03:00
cc5d5e3123 manifest: restore write mode before unlink on replace failure and publish mode (MANIFEST-STAGE-CLEANUP)
Apply published_mode(out) to staged manifest file before atomic replacement,
and restore write permission (0o600) before TemporaryDirectory cleanup in
exception block when replace fails, preventing Windows PermissionError [WinError 5]
and stranded temporary files.

agent: yes
AI-assisted: yes
2026-11-29 18:24:12 +03:00
3e0f3074c4 manifest_verifier: restore write mode before unlink on replace failure and publish mode (MANIFEST-VERIFIER-STAGE-CLEANUP)
Apply published_mode(path) to temporary cache file before atomic replacement,
and restore write permission (0o600) before unlink in exception block when
replace fails, preventing Windows PermissionError [WinError 5] and stranded
temporary cache files.

agent: yes
AI-assisted: yes
2026-11-29 18:24:10 +03:00
f49bcfe7eb Merge pull request #694 from abnalstlll-byte/feat/pe-shader-containers-multi-image
pe_shader_containers: parse and validate multi-image container layouts (OLD-9775)
2026-11-29 15:38:36 +01:00
67837f00c3 Merge pull request #707 from abnalstlll-byte/feat/dx10-test-inventory
tools: provide synthetic test inventory and subsystem map (DX-10)
2026-11-29 15:38:27 +01:00
fd49353935 Merge pull request #1159 from Taffyyy-ops/fix/awc-markers-short-read
awc_markers: reject incomplete reads (AWC-MARKERS-SHORT-READ)
2026-11-29 15:38:18 +01:00
ce792f55fb Preserve all 32 bits in dynamic R32_UINT loads 2026-11-29 09:38:14 -05:00
02bd09b41b Merge pull request #1142 from Taffyyy-ops/fix/anim-skel-report-error
anim_skel_match: report JSON write errors (ANIM-SKEL-REPORT-ERROR)
2026-11-29 15:38:07 +01:00
a554262ba8 Merge pull request #1136 from Taffyyy-ops/fix/audio-config-scan-search
audio_config: search sparse markers efficiently (AUDIO-CONFIG-SCAN-SEARCH)
2026-11-29 15:37:57 +01:00
74f470347a Merge pull request #1124 from Taffyyy-ops/fix/boot-trace-read-error
boot_trace: handle read errors during iteration (BOOT-TRACE-READ-ERROR)
2026-11-29 15:37:47 +01:00
a58d22fe2e Merge upstream ProjectLeonida/mandy main (ddfe24fba) into fix/rendering-correctness 2026-11-29 09:37:37 -05:00
6233946833 Merge pull request #1119 from Taffyyy-ops/fix/gdk-table-shape
gdk_runtime_calls: validate table lookup shapes (GDK-TABLE-SHAPE)
2026-11-29 15:37:37 +01:00
8843102027 Merge pull request #1115 from Taffyyy-ops/fix/d3d12-trace-sequence-limit
boot_trace: skip unparseable D3D12 sequence fields (D3D12-TRACE-SEQUENCE-LIMIT)
2026-11-29 15:37:27 +01:00
cd5ee11079 rdna2spirv(r9b): unconditional CS/MS LDS bounds, PS EarlyFragmentTests, mesh epilogue & PS quad swizzle
Round 9b translator fixes for rendering correctness and Mandy d3d12/ parity:

1. Unconditional CS & MS LDS OOB bounds (Mandy 21633b328 parity):
   - Record g.lds_declared from PSV0.shared for MS and RSRC2.LDS_SIZE for CS.
   - Whenever g.lds_declared > 0 (opt-out --no-lds-bounds), set
     g.lds_dwords = g.lds_bound = min(g.lds_declared, 16384) so every LDS
     read, write, sub-dword, wide, and atomic op goes through lds_access()
     (OOB reads return 0, OOB writes/atomics dropped instead of wrapping).

2. PS DB_SHADER_CONTROL bit 12 EarlyFragmentTests (Mandy f33940415/bf479a3cd):
   - Add fssm_header.db_shader_control() reading u32 at E + 0x138 (0x24C for
     rec = 0xB0; 3,023/12,101 corpus PS have bit 12 DEPTH_BEFORE_SHADER set).
   - Emit OpExecutionMode %main EarlyFragmentTests (opt-out --no-early-depth)
     and record early_depth in shader_meta when bit 12 is set and the PS does
     not export depth/stencil (no exp mrtz, DB_SHADER_CONTROL & 0x7 == 0, no
     OSG1 SV_Depth*/SV_StencilRef).

3. Defensive mesh epilogue & PS helper-lane quad swizzle:
   - MeshEXT and --mesh-compute epilogues explicitly write CullPrimitiveEXT =
     true (1) and (0, 0, 0) when %mli < %msp and !%ms_has_prim.
   - Lower quad-local ds_swizzle_b32 in PS via OpGroupNonUniformQuadBroadcast /
     OpGroupNonUniformQuadSwap (GroupNonUniformQuad capability) so Vulkan 2x2
     helper invocations participate on AMD RADV while EXEC-masked lanes still
     read 0.

Verified: compileall, check_no_game_data.py, 6,674/6,674 semantic tests (0
failures), 200/200 corpus slice (200/200 spirv-val), plus targeted LDS MS
(5/5), LDS CS (60/60), early-depth PS (120/120), and PS quad-swizzle (50/50)
corpus slices (100% spirv-val). AI-assisted.
2026-11-29 09:25:40 -05:00
d3418c61d7 Merge pull request #2205 from whoalin1/compare-unexpected-exit2
conformance compare: harden crash and image input error handling
2026-11-29 15:13:32 +01:00
9bb67cb537 Merge pull request #987 from TheGeogeo/fix/semantic-mutants-zero-test-baseline
semantic_mutants: reject zero-test baselines (MUTANTS-ZERO-TEST-BASELINE)
2026-11-29 15:09:42 +01:00
3d49d31cba Merge pull request #2258 from kirigayakazima/fix/gamedata-blobs-safety
gamedata_blobs: fix unshipped count, index type checks, and atomic JSON
2026-11-29 15:09:20 +01:00