mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 14:18:38 +00:00
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>
56 lines
2.0 KiB
NASM
56 lines
2.0 KiB
NASM
; tfe status VGPR on image_load (SHADER-1266): cs_imgload with tfe on both loads. With tfe an MIMG read reserves one
|
|
; more dword after its data, the fetch status, at vdata[data_count] (RDNA2 ISA, MIMG TFE/LWE). On a resident texel,
|
|
; RDNA2 hardware leaves the status VGPR unchanged. The two status VGPRs are seeded with distinct values (v8 = 0x3e8,
|
|
; v12 = 0x7d0) and independently checked via (v8 ^ 0x3e8) | (v12 ^ 0x7d0) before adding into v11, so zeroing or
|
|
; modifying either status VGPR shifts every texel. vk_store_test fills the r32 uint image with 100 + 8y + x and the
|
|
; r32 sint image with -2 (8y + x) before the dispatch; the rgba8 image is stored as in cs_imgstore.
|
|
; Run: vk_store_test cs_imgload_tfe.spv load -> sint = 100 - (8y + x), uint unchanged.
|
|
v_and_b32_e32 v1, 7, v0
|
|
v_lshrrev_b32_e32 v2, 3, v0
|
|
v_cvt_f32_u32_e32 v3, v1
|
|
v_cvt_f32_u32_e32 v4, v2
|
|
v_mul_f32_e32 v3, 0x3e124925, v3
|
|
v_mul_f32_e32 v4, 0x3e124925, v4
|
|
v_mov_b32_e32 v5, 0.5
|
|
v_mov_b32_e32 v6, 1.0
|
|
s_mov_b32 s8, 0x1000
|
|
s_mov_b32 s9, 0x3800000
|
|
s_mov_b32 s10, 0x11
|
|
s_mov_b32 s11, 0x11
|
|
s_mov_b32 s12, 0x11
|
|
s_mov_b32 s13, 0x11
|
|
s_mov_b32 s14, 0x11
|
|
s_mov_b32 s15, 0x11
|
|
image_store v[3:6], v[1:2], s[8:15] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
|
|
s_mov_b32 s16, 0x2000
|
|
s_mov_b32 s17, 0x1400000
|
|
s_mov_b32 s18, 0x22
|
|
s_mov_b32 s19, 0x22
|
|
s_mov_b32 s20, 0x22
|
|
s_mov_b32 s21, 0x22
|
|
s_mov_b32 s22, 0x22
|
|
s_mov_b32 s23, 0x22
|
|
v_mov_b32_e32 v8, 0x3e8
|
|
image_load v[7:8], v[1:2], s[16:23] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe
|
|
s_mov_b32 s24, 0x3000
|
|
s_mov_b32 s25, 0x1500000
|
|
s_mov_b32 s26, 0x33
|
|
s_mov_b32 s27, 0x33
|
|
s_mov_b32 s28, 0x33
|
|
s_mov_b32 s29, 0x33
|
|
s_mov_b32 s30, 0x33
|
|
s_mov_b32 s31, 0x33
|
|
v_mov_b32_e32 v12, 0x7d0
|
|
image_load v[11:12], v[1:2], s[24:31] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe
|
|
s_waitcnt vmcnt(0)
|
|
v_add_nc_u32_e32 v11, v7, v11
|
|
v_xor_b32_e32 v8, 0x3e8, v8
|
|
v_xor_b32_e32 v12, 0x7d0, v12
|
|
v_or_b32_e32 v8, v8, v12
|
|
v_add_nc_u32_e32 v11, v8, v11
|
|
v_mov_b32_e32 v12, 0
|
|
v_mov_b32_e32 v13, 0
|
|
v_mov_b32_e32 v14, 0
|
|
image_store v[11:14], v[1:2], s[24:31] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
|
|
s_endpgm
|