Files
mandy/runtime/test/shaders/ps_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

39 lines
2.1 KiB
NASM

; M1.5 pixel shader: interpolates param0 (a colour), scales it by four floats that sit in the shader's own code
; blob and are read through the code base (s_getpc_b64), and adds a root constant. Run: d3d12_translated_draw_test.
;
; The first instruction is s_getpc_b64, so the address it returns is the blob's code base + 4 (the push-constant
; code base, dwords 34-35, is the console VA of the FSSM program the layer uploaded). The table of four floats is at
; blob offset 0x100: 0x100 - 4 = 0xfc. build.py writes that blob (fssm-at / fssm-data below) next to the SPIR-V, and
; adds its SHA-256 to the index, as the translator's --fssm-dir does for the game's programs.
; scale = (0.5, 2.0, 1.0, 1.0) s11 = bias, a float from the root constants (s9, s10 are the VS offset; the
; console's graphics layout puts the table at s8 and the four constants at s9..s12), moved to s4
; mrt0 = (r * 0.5 + bias, g * 2.0 + bias, b * 1.0 + bias, a * 1.0)
; The test draws colour (0.25, 0.5, 0.75, 1) with bias 0 and 0.125, and colour (1, 0, 0.5, 1) with bias 0.25. Every
; value is a short binary fraction, so the float render target holds the exact result, bit for bit:
; (0.25, 0.5, 0.75, 1) bias 0 -> (0.125, 1.0, 0.75, 1)
; (0.25, 0.5, 0.75, 1) bias 0.125 -> (0.25, 1.125, 0.875, 1)
; (1.0, 0.0, 0.5, 1) bias 0.25 -> (0.75, 0.25, 0.75, 1)
; The header of vs_m15.asm describes the vertex data; runtime/test/d3d12_translated_draw_test.cpp the three draws.
; fssm-at: 0x100
; fssm-data: 0x3f000000 0x40000000 0x3f800000 0x3f800000
s_getpc_b64 s[6:7]
s_add_u32 s6, s6, 0xfc
s_addc_u32 s7, s7, 0
s_mov_b32 s4, s11
s_load_dwordx4 s[8:11], s[6:7], 0x0
v_interp_p1_f32_e32 v2, v0, attr0.x
v_interp_p2_f32_e32 v2, v1, attr0.x
v_interp_p1_f32_e32 v3, v0, attr0.y
v_interp_p2_f32_e32 v3, v1, attr0.y
v_interp_p1_f32_e32 v4, v0, attr0.z
v_interp_p2_f32_e32 v4, v1, attr0.z
v_interp_p1_f32_e32 v5, v0, attr0.w
v_interp_p2_f32_e32 v5, v1, attr0.w
s_waitcnt lgkmcnt(0)
v_fma_f32 v2, v2, s8, s4
v_fma_f32 v3, v3, s9, s4
v_fma_f32 v4, v4, s10, s4
v_mul_f32_e32 v5, s11, v5
exp mrt0 v2, v3, v4, v5 done vm
s_endpgm