Repository navigation
Conversation
The console's DXGI_FORMAT_D16_UNORM_S8_UINT family (118, 119, 120) does not exist on the PC: it becomes the D24_UNORM_S8_UINT family (45, 46, 47) in resource descs and in pipelines' DSV / RTV formats (pc_format). The console allows a depth-stencil resource that is also a UAV; the PC refuses that pair, so pc_resource_desc keeps the depth flag and drops unordered access, and a placed depth buffer's UNORDERED_ACCESS initial state becomes DEPTH_WRITE. GTA VI stopped on assertions at +0x344196 (its 2560x1440 D16S8 depth buffer got no size from GetResourceAllocationInfo) and +0x14a6390 (its 768x768x6 shadow maps, placed with the UAV state, were refused). Resources that still get no size or are refused are logged with their PC desc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XTYmP6vKUQKatSiA2PC95B
…nd-in shaders
GTA VI's pipeline streams carry their mesh shader (DXIL program kind 13) as subobject type 24,
the PC's amplification shader. translated_mesh_stream found no MS, did not translate them and
the driver refused the stream ("CreateAmplificationShader: ms_6_6", then "neither VS, CS nor
MS"). pc_stream_types renumbers AS / MS subobjects by the program kind in their bytecode and
makes the stream's console formats (D16S8 DSV / RTV) and rect-list topology type the PC's,
before any other path reads the stream.
fallback_stream wrote an empty slice's dangling pointer (0x1) for the shaders it drops: the
driver refused the mesh stand-ins (0x80070057) and the debug layer crashed reading 0x19. It
now writes a null pointer.
A stream refused even with stand-ins logs its subobject types and shader kinds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XTYmP6vKUQKatSiA2PC95B
… shaders, D16S8 depth formats (ivall#163)
…offset (from ivall#169) The retail game called ivall#10 (a stub returning E_NOTIMPL) and then wrote to address 0 at +0x2215c35. ivall#10 / ivall#11 are GetSubresourceLayout / GetSubresourceOffsetBytes: the XG_SUBRESOURCE_LAYOUT of a subresource, or its byte offset. Only xg.rs of ivall#169 is taken: its DSV format 118 remap is covered more completely by ivall#163 (merged with ivall#170: resource descs, pipelines, depth buffers that are UAVs).
… shaders, D16S8 depth formats (ivall#163)
…offset (from ivall#169) A title called ivall#10 (a stub returning E_NOTIMPL) and then wrote to address 0. ivall#10 / ivall#11 are GetSubresourceLayout / GetSubresourceOffsetBytes: the XG_SUBRESOURCE_LAYOUT of a subresource, or its byte offset. Only xg.rs of ivall#169 is taken: its DSV format 118 remap is covered more completely by ivall#163 (merged with ivall#170: resource descs, pipelines, depth buffers that are UAVs).
pc_resource_desc drops ALLOW_UNORDERED_ACCESS from a console depth buffer that is also a UAV. GTA VI still creates UAVs of its 768x768 shadow maps: the driver was handed an invalid view (debug layer: "CreateUnorderedAccessView … did not specify ALLOW_UNORDERED_ACCESS") and the device was removed once a dispatch used it. The PC descriptor is now a null view of the same dimension; the console descriptor XCL writes for translated shaders is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XTYmP6vKUQKatSiA2PC95B
…-target and texture-address fixes Open upstream pull requests applied as they are (their authors' work): - ivall#151 (gbuyssens): clzero / clwb / rdpru / monitorx / mwaitx / rdpid emulated on CPUs that lack them (HANDOFF.md hunk left out, it did not apply). - ivall#163, ivall#170 (Sr-0w): Xbox D16S8 depth formats, depth + UAV buffers, console mesh pipeline streams, null stand-in shaders. - ivall#168 (ShyVortex): GetGPUVirtualAddress of a placed texture. Local changes: - xg: XGTextureAddressComputer ivall#10 as GetResourceTiling, from the layout model (not checked against the console's library). - d3d12x: a UAV of a texture made without ALLOW_UNORDERED_ACCESS is a null UAV (the real call removed the device); a committed texture gets memory when the title asks for its address; clear values and view descriptions get pc_format; formats 86 / 115 -> R8G8B8A8, 116 / 117 -> R16G16B16A16_FLOAT. - Debug layer log: 8 messages per id instead of 200 in all. - The earlier "AS slot ignored" workaround stays but is no longer reached (ivall#170). - CHANGES.txt, README status and installer version for build 3. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Ran the test suite on AMD RDNA3: Radeon RX 7800 XT (16 GB), driver 32.0.32015.7029, Windows 11 Pro 10.0.26300, Rust 1.100.0
|
… buffers ivall#163 makes the console's D16S8 depth buffers D24S8 on the PC; what refers to them kept the console's formats and the PC refused them (GTA VI, with the D3D12 debug layer): - a clear value of format 118 on a D24S8 resource: E_INVALIDARG, then the title's assertion; - CreateDepthStencilView with format 118 (now hooked): the device was removed (~55 s in); - SRVs of depth / stencil planes as R16_UNORM, R8_UINT, and of a D32S8 (R32G8X24_TYPELESS) as R32_FLOAT – also the SRV XCL makes next to a texture UAV: now R24_UNORM_X8_TYPELESS / X24_TYPELESS_G8_UINT / R32_FLOAT_X8X24_TYPELESS / X32_TYPELESS_G8X24_UINT with the matching plane slice (`depth_srv_format`); - the null UAV of a depth buffer kept the console view's plane slice 1. RTVs and SRVs with 118–120 go through `pc_format` too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKtJseucqXR6iuAE6HBtiA
…eams # Conflicts: # crates/xcl/src/hle/d3d12x/real.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKtJseucqXR6iuAE6HBtiA
|
Tested aeadb23 merged onto main 956a476 on an RTX 3090 (driver 616.92), Windows 11 26300, Ryzen 9 5950X. AI-assisted test report (Claude); tests run locally as stated; the diff was read in full before running. |
|
Independent Windows + RTX 5080 GPU verification of Build & Tests
Code notes (non-blocking)
(AI-assisted) |
|
Tested the stacked PR head
One diagnostics issue remains. In The verbatim PR test cannot compile on main because |
|
Closing - main has the pieces in another form. On main (38b05b7, eaa36b6) the retail game now reaches its first menu at 30 fps with ~19 GB of commit, checked on an RX 9070; |
Stacked on #163 (uses its
pc_format); the first commit here is #163's. Review only the last commit, or merge #163 first.Problem
GTA VI's pipeline streams carry their mesh shader as subobject type 24, which is the PC's amplification shader. A diagnostic logging the DXIL program kind of each shader subobject showed:
(kind 13 = mesh).
translated_mesh_streamlooks for type 25, found no MS, and did not translate these pipelines. The stream then reached the driver as it was, and the D3D12 debug layer reportedCreateAmplificationShader: … Shader version provided: ms_6_6and thenCannot deduce Pipeline State type: neither VS, CS nor MS.Second bug, found by the debug layer:
fallback_streamwritesb.as_ptr()for the shaders it drops (&[]), which is Rust's dangling pointer0x1, not null. The driver refused the mesh stand-ins (0x80070057, so the title compiled them in its own call until its watchdog fired), and the debug layer crashed reading0x19.Change
pc_stream_types, applied first indev_create_pipeline_state: renumbers AS/MS subobjects by the program kind in their bytecode (13 → 25, 14 → 24), maps console formats in DSV/RTV subobjects (pc_format, D16S8 → D24S8) and rect-list topology type 19 → TRIANGLE. It returns a copy only when something changed; PC streams are untouched.fallback_stream: a dropped shader gets a null pointer.log_stream_shapes: a stream refused even with stand-ins logs its subobject types and shader kinds (first 6).console_mesh_streams_become_pc_ones.Result
PSO stream rejected … the fallback version too; mesh stand-ins are created.main, its mesh streams now renumbered (made the PC'sin the log). The device removal I reported earlier came from deferring compute pipelines in D3D12.X: build console pipelines at their first use (GTA VI: 45+ GB → 17 GB) #162, not from this PR (bisected).Test plan
cargo test --release -p xcl --lib: 536 passed; onlygpu_wave64_ps_whole_wave_reductionsfails, as onmainXCL_D3D12_DEBUG=1: no stream errors, no debug-layer crash🤖 Generated with Claude Code
https://claude.ai/code/session_01XTYmP6vKUQKatSiA2PC95B