Commit Graph

5 Commits

Author SHA1 Message Date
00131bb85e main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:

- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
  fixtures are left out.

What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.

Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:58:38 -05:00
193297c753 gfx10_tiling: the layout library's swizzle suggestion and layout-word rule, shared
suggested_swizzle and swizzle_from_layout_word (VIctory victory-hle xg.rs suggested() and texture(), victory-gpu
resource.rs texture_layout): 0x100 | mode, 1 linear, 0 the suggestion (linear for 1D, SW_64KB_Z_X for depth,
SW_64KB_R_X for render targets, else SW_4KB_S; VIctory marks the rule a shortcut). fill_from_title now reads the
layout word through them, so xg_xs.dll's texture computer and the layer pick the same mode for one description.

Tested: gfx10_tiling_test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:51:47 -05:00
307072f9e3 d3d12: device 70/71 textures in the console's whole layout (mips, tails, slices, 3D)
Ported from VIctory (GPL-3.0-or-later, Marvisak and contributors, DexNom fork),
victory-formats texture.rs (after AMD addrlib, MIT) and victory-gpu
resource.rs:140-170.

- gfx10_tiling.h: leonida::gfx10::TextureLayout and ConsoleTexture: block
  dimensions, mip placement and mip tails (smallest first, mip 0 last), array
  slices, thin and thick 3D, depth/stencil planes, the console format table;
  addresses and detile/tile for linear, the S and D modes (256 B, 4 KiB,
  64 KiB) and SW_64KB_R_X (one-mip 2D, Series X or S pipe tables). Other XOR
  modes and MSAA are sized only.
- fill_from_title: every mip of every slice (or of the 3D volume) of a slot
  70/71 texture is detiled from title memory and uploaded; the layout word is
  read as VIctory does (0x100 | mode, 1 linear, 0 the library's pick: linear
  1D, Z_X depth, R_X render target, else SW_4KB_S). Depth/stencil, MSAA,
  unaddressable modes and memory that is not all there stay zeroed, logged
  once each. Series S tables with LEONIDA_DEVICE_TYPE=6.

Tests: gfx10_tiling_test (VIctory's layout tests: block sizes, bijection and
round trips over 10 layouts, hand-checked offsets, mip tails, bytes_from,
planes, SW_64KB_R_X hashes from AMD's PAL, bad input; and one mip equals
TiledSurface2D), d3d12_title_memory_test on the RTX 4060 Ti (a SW_4KB_S 2D
array with a tail, a SW_64KB_D BC1 chain and a thick 3D chain read back per
subresource).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:43:10 -05:00
a5fdc8bbf9 Cache GFX10 tile X offsets and per-row Y contributions
Avoid per-element bit interleaving in tile/detile copies; retain element_offset as the independent reference and validate decoded output against it.

AI-assisted.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 17:56:49 +00:00
c43291cbe1 Add standalone GFX10 RbPlus 2D tile and detile primitive
D3D-316: copy the validated Python 4KB_S and 64KB_D bit patterns into a bounded, portable helper. Cover padded bijections, round trips, Python known offsets and invalid inputs without a GPU.

AI-assisted.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 17:49:56 +00:00