Commit Graph

5744 Commits

Author SHA1 Message Date
6f6ff81d0e Merge pull request #1671 from bobcatchris 2026-11-22 08:08:40 -05:00
7b095e80b7 Merge pull request #1669 from Roberto0953 2026-11-22 08:08:39 -05:00
1b1d090e3c Merge pull request #1667 from romainveurrier 2026-11-22 08:08:38 -05:00
536ef10a8b Merge pull request #1666 from Luiz Neves
# Conflicts:
#	docs/design.md
2026-11-22 08:08:38 -05:00
8dc8344bb4 Merge pull request #1664 from Tim Elery 2026-11-22 08:08:36 -05:00
54575594ab Merge pull request #1661 from omardev29 2026-11-22 08:08:35 -05:00
f30fd959a1 Merge pull request #1657 from Luiz Neves
# Conflicts:
#	docs/design.md
2026-11-22 08:08:33 -05:00
9ed235e77a Merge pull request #1656 from Luv Bhargava
# Conflicts:
#	docs/testing.md
2026-11-22 08:08:31 -05:00
b2257fa4f0 Merge pull request #1653 from Felix Croasdale 2026-11-22 08:08:29 -05:00
fda1aecd28 Merge pull request #1649 from Luiz Neves
# Conflicts:
#	docs/design.md
2026-11-22 08:08:28 -05:00
d47024b68b Merge pull request #1648 from cxchhh 2026-11-22 08:08:26 -05:00
7a5be8a87e Merge pull request #1645 from Kam471
# Conflicts:
#	docs/animation.md
#	docs/models.md
2026-11-22 08:08:25 -05:00
b0f2d6acdc Merge pull request #1643 from Luiz Neves 2026-11-22 08:08:23 -05:00
1676a01a80 Merge pull request #1641 from Vonsek 2026-11-22 08:08:22 -05:00
207b5d9ffc Merge pull request #1640 from StebanSchrader 2026-11-22 08:08:22 -05:00
eb083d268b Merge pull request #1639 from Luiz Neves 2026-11-22 08:08:21 -05:00
5f91260e21 Merge pull request #1637 from tylerstraub 2026-11-22 08:08:21 -05:00
17800fb88b Merge pull request #1635 from Nikolas Sturm 2026-11-22 08:08:17 -05:00
d50d71ce52 Merge pull request #1633 from Luiz Neves 2026-11-22 08:08:17 -05:00
53961b7a95 Merge pull request #1624 from Flyander 2026-11-22 08:08:14 -05:00
e1ac59e7a0 Merge pull request #1620 from Luiz Neves 2026-11-22 08:08:13 -05:00
dc93d39ce9 Merge pull request #1606 from Vonsek 2026-11-22 08:08:09 -05:00
a795fb9636 Merge pull request #1572 from romainveurrier 2026-11-22 08:08:07 -05:00
b8f9d6f906 Merge pull request #1569 from Vonsek 2026-11-22 08:08:07 -05:00
af0c2c7608 Merge pull request #1566 from AlxcBTW
# Conflicts:
#	docs/related_projects.md
2026-11-22 08:08:06 -05:00
ae7fa76ac2 Merge pull request #1562 from AlxcBTW 2026-11-22 08:08:05 -05:00
c26caf2f08 Merge pull request #1554 from Vonsek 2026-11-22 08:08:04 -05:00
38ca58e866 Merge pull request #1534 from Kam471
# Conflicts:
#	docs/README.md
#	docs/character_models.md
2026-11-22 08:08:03 -05:00
a0c07b7c48 d3d12: support tiled placed textures (D3D-191) 2026-11-22 14:07:43 +01:00
1043dac503 Support GFX10 signed 32-bit typed buffer formats (SHADER-257) 2026-11-22 05:06:13 -08:00
bd23587ffc docs: pin three SALU rows to measured gfx1100 words
`s_absdiff_i32`/`s_mul_hi_i32`, `s_lshl1..4_add_u32` and the 64-bit scalar
data ops came from the ISA pseudocode and were only CPU-checked, so a reader
could not tell a measured rule from a transcribed one. Each instruction now
has the words a real part returns, including the two SCC cases the pseudocode
calls out: a bit shifted out of S0, and a wrapped |difference| of -2^31.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 07:05:51 -06:00
0a1b235854 Merge remote-tracking branch 'upstream/main' into codex/implicit-typed-mips
# Conflicts:
#	scripts/run_gpu_tests.py
2026-11-22 14:05:00 +01:00
fa34cc023a Merge remote-tracking branch 'upstream/main' into codex/array-image-query-size
# Conflicts:
#	tests/test_shader_checks.py
2026-11-22 14:04:59 +01:00
1c58d6cfbc D3D12: BuildRaytracingAccelerationStructure writes XDXR BVH4 records
The game's translated RT shaders read the console's XDXR records, which a
VkAccelerationStructureKHR is not (docs/d3d12_vulkan.md 4.8). The standalone
Vulkan device now builds them with src/xdxr_build.h, unless LEONIDA_RT_AS=khr
keeps #743's KHR builds (the proposal in the maintainer decisions of #1548).

- VulkanDeviceInfo::xdxr_acceleration_structures; the standalone device sets
  it with bufferDeviceAddress and then leaves the KHR extensions off, so
  acceleration-structure buffers keep their console VAs.
- VulkanContext owns an XdxrBuilder; replay checks the inputs while the list
  is prepared (R32G32B32/R32G32 vertices, none/R16/R32 indices, addresses,
  counts) and records the build with heap_base added to every VA and as the
  bias for instance BLAS addresses.
- GetRaytracingAccelerationStructurePrebuildInfo answers from XdxrLayout,
  exactly; an update rebuilds, so it needs the same scratch.
- The geometry's vertex format is mapped per DXGI format (an unknown one is
  refused instead of read as R32G32B32), and its D3D12 flags reach the build.
- test/d3d12_xdxr_rt_test.cpp: a two-geometry BLAS (a soup; an R16-indexed
  grid with stride 16 and a transform) and a TLAS of three instances through
  the D3D12 API; ctest d3d12_xdxr_rt + d3d12_xdxr_rt_check.
- tools/xdxr_bvh.py: check-build compares TLAS hits by (geometry, primitive),
  and skips (77) when the build step wrote no cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:04:34 +01:00
52204af0fa docs: B8G8R8X8 in d3d12_vulkan.md (D3D-87)
List the B8G8R8X8 formats under what the Vulkan device implements: BGRA8 images whose
shader views read alpha as 1, a typeless family of their own, and no typed UAV, as on
the host runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:04:29 -03:00
289449927d rdna2spirv: 8/16-bit global stores and d16 global loads
global_store_byte/short[_d16_hi] and global_load_{u,s}byte_d16[_hi] /
global_load_short_d16[_hi] were rejected. They now go one byte at a time
at the global_* address: a store merges each byte into its dword with
atomic and/or (neighbours kept), a load reads each byte and inserts the
16-bit result into one half of vdst, keeping the other. A 16-bit access
crossing a dword is exact. The first-read analysis counts a d16 load's
vdst as read.

global_load/store_dword_addtid crashed with IndexError (no vaddr); they
now raise Unsupported. The address code moves to global_address, the
same change #1633 makes.

tests/semantic/test_global_sub_dword.py covers every byte offset 0-7 per
op, an inactive lane and the rejected forms. docs/design.md row added.
2026-11-22 10:03:47 -03:00
0f183fcafd Tools: user-SGPR census per stage (evidence for d3d12_vulkan.md 3.5)
tools/user_sgpr_census.py (standard library only) reads spirv/index.json
(user_sgpr_reads from tools/shader_meta.py) and reports, per stage: the
lowest user SGPR read as a pointer, pointer width (ptr32_lo vs ptr64), the
distance between consecutive pointer SGPRs, how the SGPR after a 32-bit
pointer is read, and reads below a given stage base. --expect stage=sgpr
turns the result into a check.

docs/d3d12_vulkan.md 3.5: the measured counts next to the current packing
description. Physical SGPRs only; no packer change.

Tests: tests/test_user_sgpr_census.py builds both packing models by hand
and checks they are told apart, plus a failing --expect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:03:22 +01:00
a0acd33d77 Docs: one Other languages line, and runtime/README links docs/runtime_imports.md
Two i18n PRs merged as "both" left docs/README.md with two quickstart lines (test_i18n_index); #1551's link in
runtime/README.md pointed at runtime/runtime_imports.md instead of docs/ (test_docs_links).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 08:02:25 -05:00
9ff55521ab ttpf_mips: add DXGI 11 and validate 2D uncompressed tiling (RDNA2 64K 4BPP) 2026-11-22 05:01:41 -08:00
6cfcf7cade rdna2spirv: every saveexec kind and s_andn1_wrexec
Only and/or/andn2_saveexec and andn2_wrexec were translated; xor, andn1,
orn1, orn2, nand, nor and xnor_saveexec (b32/b64) and andn1_wrexec were
rejected. One table (Gen.EXEC_LOGIC, the definitions of tools/cf_ref.py
_SAVEEXEC) now gives f(S0, EXEC) for the whole family; the existing three
kinds emit the same code as before.

tests/semantic/test_saveexec_variants.py checks every lane's saved bit,
new EXEC and SCC against cf_ref._SAVEEXEC in wave32 and wave64; cf_diff
(300 programs x wave32/64) still passes. docs/design.md row added.
2026-11-22 09:58:46 -03:00
9842d6f2ea Validate streamed AWC chunks and repeated Opus packets
Confine music channel tables and payloads to their own chunks, accept short final chunks, and verify that a declared repeat matches whole packets from the same channel group. Metadata scans and exports now reject the same malformed descriptors while sibling streams still export.

Tested on Linux with synthetic banks. A three-chunk libopus example with repeated packets decoded to exactly the same 6,720 PCM samples as the reference. AI-assisted.
2026-11-22 13:58:28 +01:00
6ba36655a1 docs: document disabling RTSS and OBS overlay layers for validation runs (TEST-228)
- Document that RivaTuner (VK_LAYER_RTSS) and OBS (VK_LAYER_OBS_HOOK) stay loaded under VK_LOADER_LAYERS_DISABLE=~implicit~
- Document DISABLE_RTSS_LAYER=1 and DISABLE_VULKAN_OBS_CAPTURE=1 to eliminate false validation errors in xbox_present and present tests
- Note the layer disable variables in both the test running section and Known problems table
2026-11-22 18:28:18 +05:30
bce8149378 docs/testing.md: overlay layers' own disable switches for validation runs (TEST-228)
RivaTuner's VK_LAYER_RTSS adds STORAGE usage to the swapchain it hooks,
which gives validation errors only on machines with MSI Afterburner, and
on some setups it stays loaded under VK_LOADER_LAYERS_DISABLE=~implicit~
(@Rainmaker33's loader log). Each such layer has its own
disable_environment switch, which always works: name the RTSS and OBS
ones, where any other layer's is found, and how to see the inserted
layers with VK_LOADER_DEBUG=layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:57:49 -06:00
926f51605e docs: record the character material audit and the inseparable belt 2026-11-22 12:56:14 +00:00
ca724c929a rdna2spirv: packed 16-bit integer ops (v_pk_add/sub/mul_lo/mad/max/min)
v_pk_add/sub_u16/i16, v_pk_mul_lo_u16, v_pk_mad_u16/i16 and
v_pk_max/min_u16/i16 were rejected. Each result half takes its sources'
halves from op_sel / op_sel_hi, as the packed shifts do, wraps to 16
bits, and saturates under clamp (add, sub, mad). neg_lo/neg_hi and clamp
on the other ops are rejected; a constant reads as its low 16 bits, and a
constant whose high half op_sel would read (not measured for integer
ops) is rejected.

tests/semantic/test_alu_pk_int16.py covers value grids, op_sel, clamp,
constants and the rejected forms. docs/design.md row added.
2026-11-22 09:54:29 -03:00
6290b0acd4 isa_coverage: allow v_mac_legacy_f32 (gfx1013 VOP2, missing from AMD's XML); counts at current main; wrap long lines
v_mac_legacy_f32 came in with 58706b5b; llvm-mc accepts it for gfx1013 (v_mac_legacy_f32_e32).
The docs give the counts with the commit they were taken at, and the README row no longer
quotes numbers that every new rule changes. Reported by @josevictorp in #1562.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:53:11 +01:00
840a6e3e32 world_lights_paths: map lights and the vehicle lane graph in levels.rpf (ASSET-102)
New stdlib tool on top of world_census.assemble and the world_index header
readers. Every field is read by member hash from each 0x7a resource's own
schema.

Lights: every CExtensionDefLightEffect reachable from the extensions list
of an archetype, interior archetype or entity, and its CLightAttrDef
lists. Counts per type, owner and resource kind, value ranges and checks.
With --entities (world_index.py --entities-out rows) archetype lights are
placed in world space through each map entity's transform, the same one
world_build.py --placements uses; --lights-out writes them (local only).

Lane graph: path nodes, links (lanes, flags, length) and junctions
(entrances, turns, traffic-light phases), with connectivity measured.

Full levels.rpf: 280,105 lights (450,195 placed through map entities),
63,808 nodes, 145,518 links, 1,546 junctions (369 signalised). The lane
graph equals SixNG's on every count; all 5,285 lights SixNG lacks come
from pool references at offsets 0x500..0x6ff that it reads as pointers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:52:58 +00:00
97289391da docs: sync the remaining 917e9b9 model-count citations 2026-11-22 12:52:31 +00:00
0a52416180 docs: drop the duplicate models.md index row 2026-11-22 12:52:24 +00:00
51a0281154 xdxr_build: radix sort over the exact element count instead of a bitonic sort
The bitonic sort padded the keys to a power of two and needed O(log^2 n)
dispatches, so one triangle past a power of two doubled its work (2.1 ms ->
5.2 ms at 262,144 -> 262,145 triangles on an RTX 3060, reported on #1572).
It is now a stable LSD radix sort: 8 passes of 4-bit digits over the 30-bit
Morton keys, each a count per 2048-element tile, one exclusive scan and a
scatter; 24 dispatches whatever the count, shared memory only.

- vk_xdxr_build_test: a 5000-triangle case (three sort tiles, the last
  partial); stale cases from an earlier run are removed first, so a failed
  build cannot be checked against old files.
- tools/xdxr_bvh.py: validate reports a leaf reached twice; a case may ask
  check-build for fewer rays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:51:21 +01:00