Repository navigation
gpu: packed 16-bit render targets are R8G8B8A8 where the GPU cannot render to them - #89
HenriqueSBueno wants to merge 2 commits into
Conversation
|
Confirmed the two allocation cases on an RTX 3060 Ti, Windows 10 22H2, NVIDIA 610.88. A synthetic hardware test of the patch created both 2560×1440 resources with the original flags and optimized clear values. Guest format 86 (flags 5) and 115 (flags 1) both became host format 28. Sampled-only textures retained their packed formats. One integration detail for transfers: a guest buffer footprint in either packed format still describes two bytes per pixel. Directly forwarding that footprint to a widened RGBA8 texture, or copying between a sampled-only packed texture and a widened render target, can record incompatible host copies. Resolves between widened targets also need the effective host format. In the downstream test we allowed transfers with matching representations and declined unsupported mixed transfers before recording barriers or marking the destination written. This was a native resource test. It did not run the title or establish an effect on the world hang. AI-assisted with Codex. |
|
Verified
AI-assisted. |
…ender to them AI-assisted (Claude Code)
85ea36d to
da580e4
Compare
|
Tested
No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent). |
…argets - Buffer-to-texture CopyTextureRegion: widen packed 16-bit (86/115) placed footprints to R8G8B8A8_UNORM and expand texels on the CPU at submission (packed <-> RGBA8 helpers and unit tests added for uploads and readbacks). - texture::upload: detile widened packed 16-bit textures into a tight 2-byte buffer before expanding rows into the 4-byte host staging footprint. - GPU-to-GPU CopyResource, CopyTextureRegion, and ResolveSubresource: skip mixed native-packed <-> widened copies once per format before barriers or host_written, and map resolve formats through target_format. - view_format: return None for typed widened targets so null view descriptions inherit the host resource dimension. AI-assisted (Claude Code)
|
Thanks for the reviews and the numbers on three more cards.
Checks on Windows 11, RTX 3080 (616.92): AI-assisted (Claude Code) |
|
I tested the packed texture fallback on a desktop RTX 5090 (621.24) and the integrated AMD Radeon GPU in the same PC. This builds on martingouv's note about one-bit alpha. The 5090 can't write formats 86 and 115 as typed UAVs, but the AMD GPU can. I compared the actual AMD writes against a widened RGBA8 shader running on the 5090. Rounding at each store and using the nearest expanded byte on the dependent read matched all 262,144 packed results across both formats. A different rule matched native format 86 render-target draws on the 5090. Overlapping triangles showed why converting only after a draw can still give wrong colors. For format 115 unblended draws, two inputs could become the same RTX byte but different native AMD packed values. I tried correcting the original shader output before storing it to RGBA8. That matched all 196,608 pixels across two random input sets and a rounding-boundary test. The ZIP has the shaders, a standalone GPU-to-packed-buffer readback prototype, raw logs and separate texture-layout patches. The patches apply to main at d2a4bae and PR #89 at 081afbd. All 17 standalone test programs passed locally. I haven't compiled the patched VIctory crate or tested gameplay. AI-assisted with Codex. VIctory-RTX5090-graphics-tests.zip Complete outputs folder — includes the DirectX test report, the project test results, and the graphics-test package linked above. |
…e GPU cannot render to them Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
This confirms the texture compatibility work on the real title path, but not a fix for #97. Only aggregate counts and error classes shared. AI-assisted (Kimi Code). |
There was a problem hiding this comment.
RTX 3050 8GB – PR #89 reaches intro cutscene, crashes before gameplay
Hi! I tested PR #89 on my PC, and the results were impressive!
My specs:
- GPU: NVIDIA RTX 3050 8GB
- CPU: AMD Ryzen 5 5600GT
- RAM: 16GB DDR4
- OS: Windows 11 (Build 26200)
- VIctory: PR #89, commit
081afbd - Build: Diagnostics enabled
Results:
- The previous B5G5R5A1_UNORM error was resolved.
- The game successfully displayed its menus.
- I reached the opening cutscene.
- When transitioning into gameplay, the GPU crashed.
Error:
DXGI_ERROR_DEVICE_HUNG (0x887A0006)
D3D12 debugging and DRED were enabled.
This is a huge improvement over the previous build, which crashed before displaying the menus.
I've attached a screenshot of the error. Hopefully this helps with further NVIDIA compatibility improvements!
Thanks for your work!
(Report written with AI assistance. All hardware specifications and test results are from my own testing)
|
Tested a locally adapted version of Base: main
Before #89, format 115 still failed to create its 2560x1440 host render target. After #89, both 86 and 115 logged RGBA8 widening, with zero With D3D12 debug enabled, the title reached ongoing 3D intro rendering and was manually stopped after 300.4 seconds, without reported device removal. No pipeline skips or reduced loop limit; GPU timing off. The preceding integration already survived a 321.1-second run, so I am not attributing improved stability to #89. Rendering remains badly malformed/dark/overexposed at roughly 0.5–0.65 seconds per frame. There were 171 distinct refused host pipeline records; remaining D3D12 errors include Wave64 requested on a 32-lane device (ID 622), blending on R8_UINT (676), and resource-state mismatches (527/538). This is not a validation-clean or playable run. Validation:
Adapting to newer main preserved castable-format and typed-UAV checks, tracked texture uploads, staging bounds and No game assets or raw dumps attached. Integration and testing were assisted by OpenAI Codex; credit for the upstream changes remains with their authors. Venom |
|
Tested on RTX 3070 Ti, driver 610.88, Windows 11 26300, rustc 1.98.1. main 13f91ca. Does not merge into main (conflicts), so only the head 081afbd was tested.
(Claude Code, Claude Opus 5.5.) |
…ource tree (Marvisak#33) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
On a GPU that can't render to the console's packed 16-bit colour formats, or can't write them as typed UAVs, render-target and unordered-access textures in those formats are made as R8G8B8A8_UNORM. The formats are B5G5R5A1_UNORM (86) and B4G4R4A4_UNORM (115). Textures that are only sampled keep their format.
Why
On NVIDIA (RTX 3080, driver 616.92) the title asks for two 2560x1440 targets the driver refuses:
NVIDIA has no render-target support for B4G4R4A4 and no typed UAV for B5G5R5A1. AMD has both, so this doesn't show on an RX 6700 XT.
How
resource::target_formatstands the R8G8B8A8_UNORM format in for 86/115. It applies only whenCheckFeatureSupport(FORMAT_SUPPORT)lacksRENDER_TARGETorTYPED_UNORDERED_ACCESS_VIEW, asked once per format, so AMD keeps the native formats. Each channel keeps its value, with more precision.target_format, and so does its optimized clear value.target_format, so views, PSOs and resources agree.fits: a shader-resource or unordered-access view naming 86/115 on such a texture takes the texture's format.Tested
Windows 11, RTX 3080 (NVIDIA 616.92), i5-10400F:
cargo test -p victory-gpu: 39 pass.cargo clippy -p victory-gpu: clean.cargo xtask policy: ok.packed 16-bit render targets are R8G8B8A8_UNORM on this GPUfor format 86 and format 115, and there are nono host texturewarnings.AI-assisted (Claude Code)