Files
mandy/runtime/test/shaders/vs_m15.asm
Moriz82 273b3bdf9d [integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.

Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.

Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.

Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.

No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:42:12 -06:00

32 lines
1.7 KiB
NASM

; M1.5 vertex shader: vertex fetch through a V# the application wrote into a descriptor-table slot, the way the
; translated game VS that fetch without the driver's fetch program do. Run: d3d12_translated_draw_test (the VS through
; a D3D12 graphics PSO found by the SHA-256 of its FSSM program).
;
; User data, from the root signature [0] descriptor table, [1] four 32-bit constants, in the console's graphics layout
; (from s8, one dword per table: the heaps live below 4 GiB):
; s8 = console VA of the table's first slot: the 16 bytes of a V# (base VA, stride 32, 9 records)
; s9, s10 = the draw's clip-space offset (x, y) as floats; s11, s12 = used by the pixel shader (s11: bias)
; The first four instructions move them to s[0:1] (the high dword 0, as the game's shaders force s9 to 0), s2 and s3.
; v0 = VertexIndex. The draw has BaseVertex 0 and BaseInstance 0, so v0 is the same with and without the translator's
; zero-based ids (PR 436): both give 0, 1, 2, ... for DrawInstanced(n, 1, 0, 0). A non-zero StartVertexLocation would
; make the two differ (hardware: zero-based, base in an SGPR), so the test never uses one.
; Vertex record, 32 bytes: position xyzw at 0, colour rgba at 16 (both float).
; pos0 = (position.x + s2, position.y + s3, position.z, position.w)
; param0 = colour
; fssm-at: 0x10
; fssm-data: 0x35314d56 0x20535620
s_mov_b32 s0, s8
s_mov_b32 s1, 0
s_mov_b32 s2, s9
s_mov_b32 s3, s10
s_load_dwordx4 s[8:11], s[0:1], 0x0
s_waitcnt lgkmcnt(0)
buffer_load_dwordx4 v[4:7], v0, s[8:11], 0 idxen
buffer_load_dwordx4 v[8:11], v0, s[8:11], 0 idxen offset:16
s_waitcnt vmcnt(0)
v_add_f32_e32 v4, s2, v4
v_add_f32_e32 v5, s3, v5
exp pos0 v4, v5, v6, v7 done
exp param0 v8, v9, v10, v11
s_endpgm