Commit Graph

5744 Commits

Author SHA1 Message Date
8172b5974f Merge pull request #2127 from AwkGrep256
# Conflicts:
#	docs/design.md
#	docs/testing.md
2026-11-22 13:13:06 -05:00
c457e0a7bd Merge pull request #2116 from swam122yam-glitch 2026-11-22 13:13:03 -05:00
c68a35bcb4 Merge pull request #2109 from TheHoracio 2026-11-22 13:13:02 -05:00
453ca87ba4 Merge pull request #2105 from whoalin1 2026-11-22 13:13:01 -05:00
45a5aec292 Merge pull request #2100 from Koro4e 2026-11-22 13:13:01 -05:00
4316318cb3 docs: add Arabic community quickstart 2026-11-22 20:13:00 +02:00
4d64f9a68f Merge pull request #2069 from AlxcBTW 2026-11-22 13:12:59 -05:00
79b6daac22 Merge pull request #2063 from sovljanskii
# Conflicts:
#	docs/README.md
#	docs/design.md
2026-11-22 13:12:58 -05:00
eb044a8e8e Merge pull request #2053 from Vonsek
# Conflicts:
#	docs/design.md
2026-11-22 13:12:56 -05:00
407a53923e Merge pull request #2048 from whoalin1
# Conflicts:
#	docs/testing.md
2026-11-22 13:12:54 -05:00
e903bc4948 Merge remote-tracking branch 'upstream/main' into codex/volume-typed-mip
# Conflicts:
#	docs/design.md
2026-11-22 19:12:53 +01:00
ff99084992 Merge pull request #2046 from whoalin1
# Conflicts:
#	docs/design.md
2026-11-22 13:12:53 -05:00
fc6edd298a Merge remote-tracking branch 'upstream/main' into codex/packed-2d-mip-load
# Conflicts:
#	docs/design.md
2026-11-22 19:12:49 +01:00
b4793d0452 Merge remote-tracking branch 'upstream/main' into codex/shader-int32-to-double
# Conflicts:
#	tools/rdna2spirv.py
2026-11-22 19:12:44 +01:00
db317bd3ee Merge pull request #1947 from Jolymmiles 2026-11-22 13:12:44 -05:00
75bf835356 Merge pull request #1941 from Vonsek
# Conflicts:
#	docs/design.md
2026-11-22 13:12:44 -05:00
f1fd6e443e Merge pull request #1922 from YaBulochka
# Conflicts:
#	docs/design.md
2026-11-22 13:12:42 -05:00
cae11ccb12 Merge pull request #1912 from Nolan Cotter 2026-11-22 13:12:40 -05:00
0e8634cd48 Merge pull request #1882 from Tomgamer 2026-11-22 13:12:40 -05:00
c655d1911a Merge pull request #1880 from Vonsek
# Conflicts:
#	docs/design.md
2026-11-22 13:12:40 -05:00
e13688a8dd Merge pull request #1871 from Vonsek
# Conflicts:
#	docs/design.md
2026-11-22 13:12:38 -05:00
685d16ed92 rdna2spirv: implement v_cmp_class_f64 and v_cmpx_class_f64 2026-11-22 15:12:33 -03:00
610f150a47 Merge pull request #1655 from ZazaJr24 2026-11-22 13:12:33 -05:00
136b0e07a8 Merge pull request #1534 from Kam471 2026-11-22 13:12:32 -05:00
6cfe5862ed Merge pull request #860 from adonizm 2026-11-22 13:12:29 -05:00
51d954a2cd Merge pull request #436 from S1m0ne1997 2026-11-22 13:12:27 -05:00
60cc47cb79 Merge pull request #306 from IAmNotSiob 2026-11-22 13:12:26 -05:00
a5a490efab restofworld_index: identify embedded 0x980 textures and companion TTPF pools (ASSET-148) 2026-11-22 19:12:22 +01:00
bf1c90e200 Translator: --pc-tail-ubo moves the push-constant tail to a uniform block for 128-byte devices
A device whose maxPushConstantsSize is 128, Vulkan's minimum (AMD's Windows driver on RDNA2 iGPUs, some
Intel Arc drivers), can't take the 144-byte block (152 with --mesh-compute). With --pc-tail-ubo the
push-constant block keeps s0..s31 (128 bytes), and the tail that follows them by default (heap base, code
base, the --mesh-compute output address) becomes %pc_tail, a uniform block at set 1, binding 0, with the same
members in the same order. It is declared only when the shader reads the tail; the index records "pc_tail"
and 128 push-constant bytes, and "bindings" still lists set 0 only. Without the flag nothing changes.

Step 1 of the uniform-buffer tail claimed in #1902; the GPU harnesses and the D3D12 layer that bind the
block follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:11:53 +02:00
ab5556f8c9 int_hw_probe: measure v_bfe_u32/v_bfe_i32 past bit 31 on RDNA2 (gfx1036)
The translator cuts a bitfield extract at bit 31 (bfe_width) and reads offset
and width from bits [4:0], but for the VALU form this rested on gfx1150 s_bfe
runs and LLVM's v_bfe fold; RDNA2 was unmeasured.

A new valu_bfe_past31 group in tools/int_hw_probe.py runs four 4-word cases
natively (VGPR, inline-constant and literal operands): offset + width > 32,
the sign of a field cut at bit 31, offset/width bits above [4:0], width 0.
On an AMD Radeon 610M (gfx1036) wave32 and wave64 give the same words and
all four cases match the translator, so no translator change is needed.

The measured words are pinned on the CPU in tests/test_int_hw_probe.py, the
contract table gets a v_bfe row, and the bfe_width docstring no longer says
RDNA2 is unmeasured.
2026-11-22 18:11:43 +00:00
310b2eb6d0 resource_tiling_test: drop four volume rows #868 already had (review of #2728)
8x8x64 R8, 16x16x16 RGBA8, 16x16x17 RGBA8 and 8x8x8 RGBA32F were in the
table twice with the same expectations. The deep-volume set is 32 new
layouts, 79 distinct in all; the header comment and docs/d3d12_vulkan.md
section 4.2 now say so.

AI-assisted (Claude Code).
2026-11-22 13:11:26 -05:00
d6fe52767c user_sgpr_census --pairs: VS/PS of one technique read shared root SGPRs alike (D3D-318)
docs/d3d12_vulkan.md left root-parameter visibility open: one block in
root order (the layer's model) or the console omitting a stage's invisible
parameters, which would put different parameters at the same SGPR in a VS
and a PS. The game's shaders carry no RTS0 and the executable that pairs
them into pipelines is not in the package, so --pairs pairs a VS with a PS
by technique name (names alike apart from the VS_/PS_ token) and compares
the user SGPRs both read, with all VS x PS combinations as a control.

On the 1.0.2.1 corpus: 166 techniques have both stages, 358 combinations.
All 379 shared reads have the same kind (pointer or constant), against
25.5% different over all 26,196,976 combinations; and all 111 shared
reads above an SGPR only one stage reads still agree, where omission
would have moved them. The doc records the counts and the limits: names
approximate the pipelines, and a visible parameter a stage doesn't read
looks like a hidden one.

The tests build both models from one root signature and check that they
give different counts. Names are used for pairing only, never printed.

AI-assisted.
2026-11-22 19:11:04 +01:00
8915df896e docs/progress_dashboard: the unit-test panel is CI's standard-library loop only
--run-tests runs what ci.yml's loop runs; tests/semantic and the files
that need pytest or numpy are not in it. Say so, and how to bring them in
through --junit. (TurboSosiska304's review of #2681.)
2026-11-22 15:10:54 -03:00
2aa725e6b6 Merge remote-tracking branch 'upstream/main' into codex/partial-mrt-exports
# Conflicts:
#	docs/design.md
2026-11-22 19:10:24 +01:00
c43bc3df9d d3d12: CheckFeatureSupport refuses undefined root signature versions
The layer clamped every HighestVersion above 1.1 to 1.1 and returned S_OK.
The host only does that for versions it defines: on an RTX 4070 Laptop
(621.24) and WARP, anything above 1.2 is E_INVALIDARG with the value left
unchanged. Keep the clamp for 1.2 and refuse the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:10:23 -03:00
4618927591 fix(shader): return zero for inactive swizzle sources
Neighbor colors can remain in a disabled lane. Use the same masked lane read as backward permute so an active fragment gets zero for a disabled or absent neighbor while a disabled destination keeps its previous value.
2026-11-22 19:10:14 +01:00
1d3a77e838 Merge remote-tracking branch 'upstream/main' into codex/shader-round-mode-immediate
# Conflicts:
#	docs/design.md
2026-11-22 19:10:00 +01:00
7762899b33 Runtime: hold a CPU fence signal until the queue signals before it have completed
ID3D12Fence::Signal from the CPU called vkSignalSemaphore at once, also while a queue Signal of a lower value
was still pending on the GPU. Vulkan requires a host signal to stay below every pending signal
(VUID-VkSemaphoreSignalInfo-value-03259), and D3D12 allows the order. The fence now records the highest value a
queue will signal, under the same lock as the claim, and a CPU signal above a value the GPU has not reached yet
(or made while an earlier one is held) is handed to the fence dispatcher, which applies it once the GPU passes
that value, in the order the signals were made. The callback holds no pointer to the fence; when the fence is
released (cancel) or the device is lost before the queue value is reached, the held signal is dropped, since
signalling then would break the same rule. Until a held signal is applied, GetCompletedValue reads the GPU's
progress.

d3d12_fence_timing_test: a queue Signal kept pending by a Wait on a gate fence, a CPU Signal above it (held, then
applied), and two CPU signals held behind one queue signal (applied in order). Fails on main's Fence at the first
check: the event for the CPU value fired while the queue signal was still pending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:09:56 -05:00
fd09647e06 docs/gameinput.md: CreateAggregateDevice is implemented
The API table still listed CreateAggregateDevice under "not implemented",
but the shim answers it (one device per kind, readings from every connected
device of that kind, callbacks filtered on it refused with E_NOTIMPL) and
gameinput_test covers it (test_aggregate_device). Move it to the implemented
column, say what is refused, and describe the behaviour under the table.
2026-11-22 18:09:41 +00:00
3aa4d1f906 Merge remote-tracking branch 'upstream/main' into codex/qsad-null
# Conflicts:
#	docs/design.md
2026-11-22 19:09:38 +01:00
9db658dc43 docs/rpf.md: rpf9_carve checks gaps in 1 MiB pieces since #2117; the other eight use zero_span
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:09:35 -03:00
ad88c19e97 xdxr_build: radix scan writes offsets apart from the counts, correct on MoltenVK 1.4.2
The scan read each digit count and stored its prefix sum over it. MoltenVK 1.4.2's SPIRV-Cross
(6c09849f; MoltenVK main pins aa217aeb, also affected) moves a load through a pointer bitcast
from a uvec2 past a later store to the same address, so the MSL read back the sum it had just
written. The radix path (more than 1,024 elements) then lost and duplicated elements:
blas_three_sort_tiles and blas_refit_in_place failed xdxr_build_check in 10 runs out of 10.
SPIRV-Cross 38abe362 fixes it upstream.

The prefix sums now go to their own scratch array (XdxrLayout::scratch grows by 64 bytes per
tile), so no invocation stores to a word whose loaded value it still uses. xdxr_build.inc
regenerated with glslc (shaderc 2026.4) --target-env=vulkan1.2 -O -mfmt=c.

Tested on an Apple M3 Max, macOS 27.3: xdxr_build_check passes 10 runs out of 10 on Homebrew
MoltenVK 1.4.2 (0/10 before), MoltenVK 5189f8de with SPIRV-Cross 57e4efcc, KosmicKrisp and
llvmpipe. The full native ctest passes 36/36 on each driver, with the same two skips as before.
AI-assisted.
2026-11-22 22:09:22 +04:00
21f2585a48 Merge remote-tracking branch 'origin/main' into bindless-per-queue-retire
# Conflicts:
#	runtime/test/d3d12_descriptor_test.cpp
2026-11-22 19:08:58 +01:00
e64bebf1c3 tools: sad_diff.py, a differential fuzzer for the SAD family
Seven opcodes (v_sad_u8, v_sad_hi_u8, v_sad_u16, v_sad_u32, v_msad_u8,
v_qsad_pk_u16_u8, v_mqsad_pk_u16_u8) against an ISA-written reference and
the translated SPIR-V in spirv_mini_interp, four exported words, bit for
bit. A 785-program sweep covers every source-kind combination (the 64-bit
constant rule pinned both ways), random seeded programs widen the values.
12,810 programs across six seeds match with zero mismatches and zero
skips; two translator mutations make 36/60 and 17/60 programs fail.
clamp, op_sel/neg/abs, v_mqsad_u32_u8 (#1926/#2163) and null as a 64-bit
quad source (#2650) are out of scope, on purpose.
2026-11-22 19:08:55 +01:00
66484d8cea bvh_match: say why an empty run matched nothing, and fail cleanly on a manifest/OBJ mismatch
An empty result has two very different causes and the tool said neither: the drawable may be outside the
exported window (a window holds one region's drawables), or the model's geometry list may not follow the
triangle-count rule. Both now come with a line saying so, and a manifest that holds no model at all says that
too instead of reporting only "no Items".

While reviewing it, two traces were still possible instead of a message: an OBJ with fewer `o` groups than the
manifest's geometry arrays (now an error naming both counts) and a non-string shader hash (now reported per
candidate, not as a traceback). Exit status is documented in the docstring.

Reported by @kacper-serewis: an independent run against a 1 GiB window cut at 10 GiB exported 3,731 models with
no failures and found no candidate for the first ten BLAS of the comparison pack, whose drawables are in the 3 GiB
window this PR measured. The run was correct; the report did not name its window, and docs/bvh.md now does.

Synthetic tests only; three cases added, 16 in total.
2026-11-22 19:08:42 +01:00
ee0253c1fb isa_coverage: count op.endswith dispatch families (s_*_saveexec_b32/b64) 2026-11-22 19:08:21 +01:00
502dc77f99 vertex_types: decode the tangent and bitangent sign in the rest of the tag 0x21 word
The mesh shaders build a tangent from the bits the normal leaves: with bit 31 set, bits 20-29 are an angle
(v * 2pi/1023 - pi) that turns a basis made from the normal alone; with bit 31 clear, bits 16-22 and 23-29
are a 7-bit octahedral tangent. Bit 30 is the bitangent sign. tangent_0x21 is that decode, and the tool
now counts each tangent against the texture-coordinate gradient dP/du of its triangles, with a randomly
turned tangent as the chance level, and bit 30 against the side of dP/dv. docs/restofworld.md records
the counts on two archive samples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:07:39 +00:00
f206d479a6 tools: classify the gap between streams without copying it
Nine archive scanners sliced every gap out of the mmap to test whether it
was all zero (`gap = m[last:s]; gap.count(0) == len(gap)`). The slice is a
copy, so a gap of N bytes allocated N bytes at once; about half of
story000.rpf (~20 GB) is non-zlib, which ends in MemoryError on a 16 GB
machine.

tools/zero_span.py compares the gap with zeros 4 MiB at a time and stops at
the first non-zero window, with the same counts (all of a gap is padding
when every byte is zero, otherwise all of it is unread). rpf9_carve,
rpf9_names, bvh_index, navmesh_index, navmesh_decode, rbf0_index,
anim_index, restofworld_index and story_index use it.

tests/test_zero_span.py checks the counts against the old expression and
runs each scanner on a 48 MiB gap under tracemalloc: 50-51 MiB heap peak
on main, under 24 MiB with this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:07:15 -03:00
a2ef9e8dc4 meshlet_page: the slot tag byte is (stride / 4) << 5 | type; +0x7C is the UV scale
rpf9-explorer's RageModelDecoder reads vertex slots this way; it sizes all
99,184 slot words of the minigame archive's 63 30 and 42 40 blocks (counts
only), so tag_stride replaces the per-tag table (for the six types seen) and
the archive walk gives identical totals. docs/story.md gets the tag/type
table, the +0x7C meaning (snorm16 UV scale, rpf9-explorer) and the slots
actually used (0-4, 11-15, 18; #2424 said 0-4 and 11-14).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 19:06:56 +01:00
0ed394a00e docs/design: merge the duplicated Integer clamp rows 2026-11-22 21:05:27 +03:00