Repository navigation
Conversation
|
Tested Environment: Windows 11 Pro build 26300, AMD Ryzen 7 5700X, 16 GB, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1 Tested
Reading the code
Not tested: no game data, so the live AI-assisted (Claude Code) ran the checks and drafted this comment. |
|
Local AMD results for PR head b57e10d: Environment: Windows 11 Pro build 26300, AMD Radeon RX 6750 XT, driver 32.0.21045.29003, rustc 1.100.0.
This confirms the synthetic host-resource substitution path on this AMD adapter. It does not test a title render, PSO acceptance, or title texture copies. I also checked the copy wrappers in crates/victory-gpu/src/list.rs: copy_resource forwards the host resources to CopyResource, and copy_texture_region forwards them to CopyTextureRegion; neither path converts formats. If the title copies between a sampled-only format-67 resource and a substituted format-10 target, that copy would violate D3D12 format/size compatibility. Microsoft documents the CopyResource restrictions here: https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-copyresource and CopyTextureRegion format compatibility here: https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-copytextureregion. I could not confirm whether GTA VI makes such copies without a live title diagnostic capture. If an existing run has D3D12 debug output or copy diagnostics for these format-67 targets, that would settle the remaining question. |
|
The widened render-target format works in a local Windows integration on an RTX 3080 Ti. There is also a distinct title use case worth preserving: a placed R9G9B9E5 SRV at exactly the same address and dimensions as a writable R32_UINT texture. I verified in a separate GPU test that a castable R32_UINT allocation sampled through the packed SRV decodes a unit red channel correctly. The title creates these pairs during its first scene. An independent RGBA16 allocation for the reader loses the writer's pixels in that case. The tested widening and the packed alias path coexist locally. World lighting is still under investigation. |
LAKSHYA-cmd-tech
left a comment
There was a problem hiding this comment.
Verified on Windows 11 D3D12:
- All 45 tests in \�ictory-gpu\ pass, including the new
9g9b9e5_target_format_substitutes_rgba16f\ and
9g9b9e5_render_target_and_uav_textures_create_on_host\ tests against the host D3D12 device. - Format substitution from format 67 to \DXGI_FORMAT_R16G16B16A16_FLOAT\ cleanly resolves \E_INVALIDARG\ when creating render target and UAV resources.
- \cargo clippy -p victory-gpu\ is clean with zero warnings.
- \cargo xtask policy\ passes (zero asset policy violations, synthetic tests only).
mercuryVM
left a comment
There was a problem hiding this comment.
Tested b57e10d on Windows 11, RTX 5070, MSVC: cargo test -p victory-gpu -- --test-threads=1 45 passed, including r9g9b9e5_render_target_and_uav_textures_create_on_host, which does create the host texture here for flags 4 and 5. Clippy's 1 warning is the existing one in host.rs.
Substituting a render-target-capable format is reasonable, and the view-format fix-up in fits is consistent. One concern before approving: the substitute has a different texel size, and the copy paths between title memory and the host texture size themselves from different descriptions.
texture.rs(the upload staging path):GetCopyableFootprints(&d, …)is computed from the host description,R16G16B16A16_FLOATat 8 bytes per texel. The title'slayout(victory_formats::texture::Layout) describesR9G9B9E5at 4 bytes per texel. Any contents the title writes from the CPU, or that are uploaded on first use, are then detiled into rows twice as wide as their data, and RGBA16F reads them as half-floats, not shared-exponent colour. The same mismatch applies to whatever copies the target back into title memory (copy-back or readback), where the host row is twice the title's.- If these targets are only ever GPU-written and GPU-read, that's harmless. But then upload and copy-back should be explicitly refused for a substituted texture, with a
once!log, rather than silently converting bytes. If they can be CPU-touched, the copy needs an R9G9B9E5 ↔ RGBA16F conversion, which a compute pass or a CPU loop could do. - A test that uploads one known R9G9B9E5 texel into a flags-5 texture and reads it back would show which case you're in.
AI-assisted (Claude Code).
|
I reproduced the R32_UINT writer → placed RGB9E5 reader in Raxstreams’ first-scene report. A compute shader wrote red and then green through the integer UAV. The RGB9E5 reader at the same guest address returned black both times. The attached patch builds on #643 at With the patch, the shader read red, then green, and still read green from a second command list. CPU-supplied blue survived both before the first GPU write and after the producer was released. Three controls (different address, width, or tiling) stayed black. All nine reads passed on #643 and on a local integration of The test ran as a Windows x64 binary under Wine 10 with vkd3d-proton 2.14.1 and Mesa llvmpipe (software rendering). Direct heap indexing and recording a consumer on another list before the producer’s first submission remain untested and outside this patch. The first mission still needs an in-game check on native D3D12. The ZIP contains the source diff and regression test. On a D3D12 machine with D3DCompiler 47, apply the diff on top of #643 and run cargo test --locked -p victory-gpu --lib -- --ignored --exact draw::packed_tests::placed_rgb9e5_reads_the_latest_r32_writer --nocaptureImplementation and testing were assisted by Codex. |
|
@RussoJr here is the native D3D12 run of your patch. Environment: Windows 11 Pro build 26300, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1
So on native hardware the control reproduces the black reads of Raxstreams' report, and the patch turns them into red then green. The green also holds from the second command list, and the CPU-written blue returns once the writer is released. The three controls (other address, width, tiling) stay black either way. Like your run, this covers table-bound SRVs only. Direct heap indexing and a consumer recorded on another list before the producer's first submission aren't covered. No game data used. AI-assisted (Claude Code). |
|
Independent HDR resource check on GTX 1660 Ti (6 GB), NVIDIA 581.42, Windows 10 22H2 19045.6466, Ryzen 5 3600, Rust 1.98.1 MSVC and Agility SDK 1.620.2. Base d2a4bae; PR b57e10d. Added a test-only adapter check requiring NVIDIA LUID 00000000:00017c52.
Codex prepared the worktree, ran the tests and drafted this report. |
|
I tested the format-67 → RGBA16F render-target path on
Follow-up commit maps every selector for missing source alpha to constant one when the underlying texture is widened. An implicit SRV gets an explicit full-texture view so it uses the same mapping. This follows the RGB9E5 decode rule. The mismatch reproduced on both RTX 5090 and WARP. The follow-up passed six readbacks on each backend, including an ordinary RGBA16F control with alpha |
|
Test report: NVIDIA RTX 3060 Laptop 6 GB (Ampere), Setup: Windows 11 build 26300, driver 596.21 (32.0.15.9621), title 1.0.2.1 (own copy), Rust 1.98.1, diag build. Base:
So on this card the format-67 refusals only occur in Series S mode, and this PR removes both. What it does not do alone: with only this PR on the base, the Series S menus stay black (70 s, no input, 30 fps); the picture needs #211 (two present planes). With both merged the menus are correct and the world is reached in Series S mode for 4.5 minutes with no device removal; numbers in my report on #211. Not tested: this PR in Series X mode, where no format-67 target was refused here anyway; other GPUs. One run per row. AI use: Claude Code (Claude Fable 5.2) built the trees, ran the runs and wrote this report from the logs; a second tool (Codex) checked the numbers against the logs. The hardware, the title copy and the runs are the user's. |
|
Following the flags-4 report, I ran a separate typed UAV write → SRV load test on RTX 5090, AMD Radeon Graphics and WARP all produced the expected RGB values on both revisions. The backing texture was RGBA16F on each device. The author's head returned the stored alpha This covers the explicit typed UAV and default-mapped SRV on the widened flags-4 resource. The test uses |
b57e10d to
c7bb83f
Compare
|
Independent integrated test on Windows 11 x64 build 26200, Ryzen 5 5600, 32 GiB RAM, RTX 4080 / NVIDIA 617.42, Rust 1.98.1. Tested stack: main
Integration notes: #89's packed conversion/copy guards were combined with main's title-written texture upload handling. The ordinary host upload path retains No retail files, captures or raw game logs attached. Follow-up with 12 GiB additional active paging-file headroom: the same integrated runtime got past the earlier memory guard and attempted hundreds of draws per frame, roughly 1 fps. The first captured 3D-stage frame was black. The process then exited with |
|
Thank you for this, @Yaekai! Many pull requests here are still waiting to be merged, so I've ported this one to 465d6a0eac/AgentRecompVI, a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/34. You're credited as the author there. This pull request stays the original. Test results
|
VIctory #492 makes R9G9B9E5_SHAREDEXP (67) render targets and unordered access textures R16G16B16A16_FLOAT, clear values included, with views of 67 binding the host format; sampled ones keep 67. fb3db31's format table does not cover 67, but it already does the rest for the formats it has: one host format per title format, applied by pc_format to textures, views, render target views, pipeline targets and clear values, decided once from CheckFeatureSupport. So 67 becomes an entry of that table rather than a second, per-use mapping (resource::target_format and the special case in descriptor/host.rs fits): - #492's split leaves a title copy between a sampled 67 texture and a target of 67 between two host formats D3D12 does not copy between; one host format per title format keeps copies and views consistent. - Title-written 67 texels (uploads, buffer-to-texture copies) convert exactly: every shared-exponent channel is a 16-bit float (at most 9 significant bits, 2^-24 to 65,408); tested over every mantissa and exponent. xcl takes R11G11B10_FLOAT instead, which rounds the 9-bit mantissas to 6 and 5 bits. - The cost: 8 bytes a texel instead of 4, sampled 67 textures included. On the RTX 4080, the format sweep now creates 539 textures (534 before): 67 with render target and unordered access uses. This is resource/format.rs, the dark-world task's: one table entry and its conversion, nothing else there. Ported from Marvisak/VIctory#492 (head b57e10d) by Yaekai Co-authored-by: Yaekai <21324379+Yaekai@users.noreply.github.com>
|
I independently checked the earlier bit-preserving alias-copy route on native Windows D3D12, with three mip levels and two array layers. A synthetic compute dispatch wrote different packed lighting words through The RTX 4070 and WARP both matched all 42 packed words (4×4, 2×2, and 1×1 on each layer) and all 42 expected RGBA tuples, with alpha 1. This corroborates the multi-subresource copy itself on native D3D12 for the alias case discussed in this thread. The fixture did not include VIctory's guest-address lookup, producer ordering, or resource lifetime. Those remain the integration questions before attributing any scene lighting change to it. In two separate title runs on this RTX 4070, the AI-assisted testing. No title files or images attached. |
… PresentX planes Merges https://github.com/fxceless/victory-fork (main, 4e17478) into this fork. The two rewrote the same GPU and shader code (20 files, 80 conflicts), so the merged tree is fxceless's tree, with two additions it does not have, re-applied on top: - The FidelityFX upscaler answered by AMD's PC FidelityFX SDK when VICTORY_FFX_DIR is set (the pc-fsr branch, f96ad82): applied unchanged. - PR Marvisak#211's multi-plane PresentX compositing (Series S menus): several planes are composited in a list of their own; a single plane keeps fxceless's present path, including presents sent ahead. Dropped in favour of fxceless's own implementations: this fork's lazy host textures and VRAM report, bounds root constants, rectangle geometry shader, mesh index/position changes, the diagnostics switches added with them, and PRs Marvisak#89, Marvisak#492 and Marvisak#578 (fxceless has its own target formats and wave64 handling; Marvisak#578 refused every wave64 compute program on 32-lane GPUs). That work stays reachable on the try/pr-211-578 branch at 575a4ee. Builds with and without the diagnostics feature; the workspace tests pass. Not run in the game yet. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…6B16A16_FLOAT) onto Marvisak#211 + Marvisak#1024 + Marvisak#346 + Marvisak#334 + integ/next Conflicts, both in tests: 1. crates/victory-gpu/src/descriptor/host.rs: the stack's tests (`raw_views_start_on_16_bytes` and the raw/structured view tests after it, from Marvisak#1426/Marvisak#704) and Marvisak#492's four `rgb9e5_srv_*` tests at the same place; git interleaved them over shared lines (a resource description's `SampleDesc`, a closing brace), so the two hunks are not separable texts. Resolved by keeping the stack's tests exactly as they were and adding Marvisak#492's four tests whole, as Marvisak#492 has them, before `dynamic_slots_are_held_until_released` (where Marvisak#492 put them). The resulting diff of the file against the previous head equals Marvisak#492's own (+235/-5 against main). 2. crates/victory-gpu/src/resource.rs: the stack's `get_desc_reports_the_allocated_mip_chain` and Marvisak#492's `r9g9b9e5_target_format_substitutes_rgba16f` / `r9g9b9e5_render_target_and_uav_textures_create_on_host` at the end of the module. The shared text holds the `#[test]` before and the closing braces after: the stack's test is closed in the hunk and Marvisak#492's follow as separate tests (not nested). The non-test changes (`target_format`, `fits` taking a resource description, `fits_texture_srv`, RTV and pipeline formats) merged without conflict. `fits` has no other caller in the stack. Uploads from title memory still skip render-target/UAV textures (`texture::title_written`), so no 4-byte RGB9E5 rows are detiled into a substituted 8-byte texture. Known open point from the review, not fixed by Marvisak#492: a copy between a substituted target and a sampled-only RGB9E5 texture would mismatch formats on the host; no report shows the title doing that. No non-textual fix needed (cargo check --all-targets --all-features).
…sak#98, Marvisak#334 to Marvisak#492, validation) The line rebuilt on the bundles' current heads (Marvisak#1402 119b763, Marvisak#1492 5bbc098 without Marvisak#98, Marvisak#1504 1d41891, Marvisak#1511 ca601f0) with every merge replayed, and the merges after this file's first version (Marvisak#334, Marvisak#346, Marvisak#1024, Marvisak#211, Marvisak#492): merge order, the runner's numbers on 967d3ae (RTX 571, WARP 570 + the known Marvisak#1084 failure, all features 580; Marvisak#98's one test leaves), what is not included (Marvisak#98, Marvisak#282 for Marvisak#346, Marvisak#693 for Marvisak#1024, Marvisak#306's latest commit), and the open pull requests whose head is contained here (109, from the 18:24 collection). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l at the world)
In Series S mode the title asks for its FidelityFX upscale output as a
1920x1080 R9G9B9E5_SHAREDEXP texture with render target and unordered
access. PC D3D12 never allows either use in that format: the texture was
refused, and the render target view made for it in that format removed
the device ("CreateRenderTargetView: The format (0x43, R9G9B9E5_SHAREDEXP)
cannot be used with a RenderTarget view", then DXGI_ERROR_INVALID_CALL),
the moment the world began. Series X does not hit it: its title does not
upscale by default.
target_format now gives R16G16B16A16_FLOAT for R9G9B9E5_SHAREDEXP on every
host (PR Marvisak#492's rule, lost when this fork's tree replaced the one that had
it). Texture creation, clear values, render target views, pipeline formats
and the view checks all go through target_format, so they agree.
shortcut: a view of the stand-in reads the alpha written there, where
RGB9E5 reads 1.
Tests: the mapping, and the title's exact texture made on the host GPU.
Also fixes PR Marvisak#211's PresentX test for this fork's rtv() (an Option), which
did not compile with the diagnostics feature.
Verified in the game: Series S no longer loses the device; FSR upscales
(first upscale result=0) and the world runs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
c7bb83f to
bf41b81
Compare
Summary
On Xbox Series X|S, GTA VI allocates HDR scene/lighting targets in
DXGI_FORMAT_R9G9B9E5_SHAREDEXP(format67) withALLOW_RENDER_TARGET | ALLOW_UNORDERED_ACCESS(e.g.1920x1080,flags: 5andflags: 4). PC D3D12 forbidsR9G9B9E5_SHAREDEXPas a render target or unordered-access resource, causingCreateCommittedResourceto fail withE_INVALIDARG(no host texture) and leaving those passes without a host texture.Changes
crates/victory-gpu/src/resource.rs:target_format()substitutingR9G9B9E5_SHAREDEXP(67) →R16G16B16A16_FLOAT(10) for resources created withALLOW_RENDER_TARGET | ALLOW_UNORDERED_ACCESSand their clear values.R9G9B9E5_SHAREDEXPtextures keep format67(pc_format).view_format()so substituted typed targets are not mistaken for typeless resources.r9g9b9e5_target_format_substitutes_rgba16fandr9g9b9e5_render_target_and_uav_textures_create_on_host).crates/victory-gpu/src/descriptor.rs:Target::desc()maps RTV formats throughtarget_format().crates/victory-gpu/src/descriptor/host.rs:fits()accepts SRV/UAV views requestingR9G9B9E5_SHAREDEXPon a substitutedR16G16B16A16_FLOAThost texture and binds the host format.crates/victory-gpu/src/pipeline/host.rs: PSORTFormatsmap throughtarget_format().Verification
cargo test -p victory-gpu --lib: 45 passed, 0 failed (including both newr9g9b9e5tests on D3D12).--console series-s):no host texturewarnings forformat: 67dropped to 0.