Read colour textures in the requested format and reuse tile offsets #370

Closed
github-bot wants to merge 646 commits from github-bot/gh-370 into main AGit
Owner

@⁠TaynanGT on GitHub · 2026-11-27 20:09 UTC · original
TaynanGT:perf/streamed-textures-nov27 → main · +59365 −5346 · 203 files · 646 commits · closed without merging

The renderer was reading some colour textures with the wrong transfer function. On my RTX 4090, a mid-grey texel returned 0.50196 through an sRGB view. With AnoHunted's fix from Marvisak/VIctory#331 it returns 0.21582, close to the expected 0.21586. The linear and default views of that linear texture still return 0.50196. The GPU test covers both directions across seven format pairs. In a separate 256-colour ramp, converting the GPU's sRGB reads back to 8-bit display values recovered all 768 input channels.

Texture uploads now reuse the offset tables and overlap checks for each tile pattern, building on Vladimir-Human's converter in #191. Each copy still checks its mip dimensions, row pitch and buffer lengths. I also adapted Xavi Fortes's two-slot descriptor binding from XaviFortes/VIctory-RDNA@c43982ea2c. It keeps the view and sampler heaps alive and avoids a temporary allocation when binding them.

All three CI jobs passed, as did the release tests for victory-formats (49 passed, eight ignored). I'm checking the gameplay result separately at 3840 × 2160 with DLSS Quality and frame generation enabled. Rendered, generated and presented frames are counted separately.

**@⁠TaynanGT** on GitHub · 2026-11-27 20:09 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/370) `TaynanGT:perf/streamed-textures-nov27` → `main` · +59365 −5346 · 203 files · 646 commits · closed without merging The renderer was reading some colour textures with the wrong transfer function. On my RTX 4090, a mid-grey texel returned 0.50196 through an sRGB view. With AnoHunted's fix from Marvisak/VIctory#331 it returns 0.21582, close to the expected 0.21586. The linear and default views of that linear texture still return 0.50196. The GPU test covers both directions across seven format pairs. In a separate 256-colour ramp, converting the GPU's sRGB reads back to 8-bit display values recovered all 768 input channels. Texture uploads now reuse the offset tables and overlap checks for each tile pattern, building on Vladimir-Human's converter in #191. Each copy still checks its mip dimensions, row pitch and buffer lengths. I also adapted Xavi Fortes's two-slot descriptor binding from XaviFortes/VIctory-RDNA@c43982ea2cca87a68426d776b745d745d641a3a3. It keeps the view and sampler heaps alive and avoids a temporary allocation when binding them. All three CI jobs passed, as did the release tests for victory-formats (49 passed, eight ignored). I'm checking the gameplay result separately at 3840 × 2160 with DLSS Quality and frame generation enabled. Rendered, generated and presented frames are counted separately.
Adapt the texture view fix from Marvisak/VIctory#331 (ccdecb80807826e49ce82a5d9aa6e7814d2b8376). On devices that support fully typed format casting, preserve the requested transfer function for RGBA, BGRA, BGRX and BC1/2/3/7 shader resource views. Keep the existing UAV rules and bypass format matching on identical formats.

Exercise both directions and the default view using a compute shader that reads the texture through the runtime. Compare the pixel values returned by all seven format pairs.
Use the view and sampler handles directly from a two-slot array. Keep the existing binding order and command-list lifetime for each available heap, including when only a sampler is bound.

The fixed-size binding idea comes from Xavi Fortes in XaviFortes/VIctory-RDNA@c43982ea2c.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 20:13:00 +00:00
github-bot closed this pull request 2026-11-30 17:14:43 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-30 17:11 UTC · original

Superseded: main has moved to a new line of the code (see #468). Whatever is still worth having from this will come back as a new PR on the current main.

**@⁠TaynanGT** on GitHub · 2026-11-30 17:11 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/370#issuecomment-7285853867) Superseded: `main` has moved to a new line of the code (see #468). Whatever is still worth having from this will come back as a new PR on the current `main`.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.