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

Closed
TaynanGT wants to merge 646 commits from upstream-pr/370 into main
TaynanGT commented 2026-11-27 20:09:27 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T20:09:27Z.


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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5532500473 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/370). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T20:09:27Z. --- 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.
TaynanGT commented 2026-11-30 17:11:10 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T17:11:10Z.


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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7285853867 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/370#issuecomment-7285853867). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-30T17:11:10Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
TaynanGT/Vice-Tay!370
No description provided.