Repository navigation
Conversation
|
This pull request is labeled |
|
I think the current rule also enables a wrong color path for PQ output. Could you keep the PQ cases on the conversion/fallback path (or add an explicitly PQ-aware GPU conversion path), and add a regression that covers PQ on both SDR and HDR10 surfaces? The current decision-only assertion cannot validate either output color behavior. I have not run a GPU integration test for this change. |
MarcZX10
left a comment
There was a problem hiding this comment.
The current implementation enables a direct blit for 8-bit resident images for every ten-bit display, including PQ. The existing presentation code uses DisplayPq to select tone mapping for SDR output and HDR10 passthrough for an HDR surface. The new Blit path bypasses the former conversion and, for HDR10 passthrough, fails the present() precondition unless the HDR scaler path is used. This is a correctness blocker for the PQ cases now asserted by the tests. Please keep PQ on the conversion/fallback path or add a PQ-aware GPU conversion path, and cover both SDR and HDR10 output behavior. The paired performance traces requested by the perf label are also still missing. Details and the source-path evidence are in my discussion comment. I did not run a GPU integration test.
5b65588 to
d2eea56
Compare
Thanks for the catch regarding PQ displays! I've updated the implementation so that PQ formats ( The GPU presentation path (Blit/Convert) is now only enabled for non-PQ SDR 10-bit displays, and the PQ regression expectation in |
| case VK_FORMAT_B8G8R8A8_UNORM: | ||
| case VK_FORMAT_B8G8R8A8_SRGB: | ||
| if (pq) return ResidentPresent::None; | ||
| return blitSource ? ResidentPresent::Blit : ResidentPresent::Convert; |
There was a problem hiding this comment.
This branch now returns Blit for sRGB storage whenever blitSource is true. For example, the still-present assertion at ResidentPresent.cpp:44 expects ResidentPresent::Convert for VK_FORMAT_R8G8B8A8_SRGB → Rgba8, but this exact head returns Blit. I compiled the exact-head DisplayFormat.cpp with a focused check; it printed actual=1 (Blit), expected=2 (Convert), and exited nonzero. The test’s reason is relevant: blitting an sRGB source applies sRGB decoding, so it cannot take this direct path. Please preserve conversion for both sRGB storage formats and add coverage for sRGB to 10-bit SDR as well. The advertised decision tests do not pass on this head.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed updated exact head d2eea5654f69048474f231db873bcd6d77f6c4b4. The earlier PQ concern is addressed by keeping PQ on the fallback path and adding PQ decision assertions. A focused exact-source check found a regression: the new common 8-bit branch blits sRGB source formats, while the existing test expects conversion; I confirmed this by compiling the exact-head DisplayFormat.cpp and observing Blit instead of Convert. The full ResidentPresent binary was not run, and no GPU integration test was run. See the inline finding for the reproduction and requested correction.
|
The current PR body now contains only the |
d2eea56 to
06e5df1
Compare
I have updated |
MarcZX10
left a comment
There was a problem hiding this comment.
Re-reviewed exact head 06e5df182b00c44ffdc03d4e8cf568a8edefc2d9. The source now keeps PQ on the fallback path and sends SDR 10-bit 8-bit UNORM, sRGB, and UINT storage through Convert; the added sRGB assertions address my prior exact-source finding. The remaining review blockers are validation evidence and the required performance report:
- This changes the AGC presentation path.
AGENTS.mdrequires the same focused tests onmainand the change withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1, andVK_LAYER_KHRONOS_validation, plus checking for missing-layer warnings and newVUID-messages. The body reports decision assertions and Windows title runs, but does not report those paired validation-layer runs. Hosted product jobs are skipped. - The body still claims the change eliminated a readback stall and restored full GPU framerates. The repository requires
tools/trace_digest.pysummaries and attached main/change traces from the same machine, scene, and title for a speed claim. Those captures are absent. Please add the paired evidence or remove the speed claim and relabel if appropriate. - The GPU checklist gives driver and OS but omits the GPU vendor/model required for AGC changes.
The reported standalone decision tests and UE4 runs are author-reported; I did not independently run a GPU test. I have not found a new source-logic defect in this head.
adriadam10
left a comment
There was a problem hiding this comment.
The PQ and sRGB points from the earlier review are fixed in the code. Two things are still missing:
- Pixel equivalence.
Convertfor an 8-bit resident image on a 10-bit display (VulkanDevice.cpp:3715,DetileImagewithtenBit) reinterprets the raw 8-bit RGBA word as a packed 2-10-10-10 word. That is only correct if it matches what the guest-memory path shows for the same bytes. The change that introduced the rule (6142e82) tested 8-bit→8-bit and 10-bit→10-bit only.ResidentPresent.cpppins the decision, not the pixels. Please add a test that presents an 8-bit image on anRgba8|TenBitand aBgra8|TenBitdisplay through the GPU path and compares it with the CPU decode and the guest-memory path, like the existing converted-image checks inagc_driver_recorder_tests. - Evidence. The PR is labeled
perf, so it needs theaps5-summary.jsonllines formainand the change, from the same title, scene and machine, plus thetools/trace_digest.pyoutput. "UE4 titles" needs the title/PPSA and the numbers. For an AGC change,AGENTS.mdalso needs the focusedctest -R resident_present -V(andagc_driver_recorder_tests) logs onmainand on the change withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, showing no newVUID-errors.
adriadam10
left a comment
There was a problem hiding this comment.
The PQ and sRGB points are fixed in the code, thanks. Two things are still missing:
- Pixel equivalence:
Convertfor an 8-bit resident image on a 10-bit display (VulkanDevice.cpp:3715,DetileImagewithtenBit) reads the raw 8-bit RGBA word as a packed 2-10-10-10 word.ResidentPresent.cpppins only the decision, not the pixels. Please add a test that presents an 8-bit image on anRgba8|TenBitand aBgra8|TenBitdisplay through the GPU path and compares it with the CPU decode (DisplayBuffer.cppdecodeTexel) and the guest-memory path, like the converted-image checks inagc_driver_recorder_tests. - Evidence: the PR is labeled
perf, so it needs theaps5-summary.jsonllines formainand the change from the same title, scene and machine, plus thetools/trace_digest.pyoutput. "UE4 titles" needs the title/PPSA and the numbers. For an AGC change, also the focusedctest -R resident_present -Vandagc_driver_recorder_testslogs onmainand on the change withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, showing no newVUID-errors.
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (3 IDs in 380 tests)Skipped (41)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
There was a problem hiding this comment.
"Eliminated CPU readback stall and restored full GPU framerates" is a speed claim, so it needs tools/trace_digest.py summaries of main and of this change from the same machine and scene. Which title was it? "Unreal Engine 4 titles" doesn't let anyone reproduce it.
This is a VideoOut/AGC change, and Tested only has a standalone run of the decision test. Please run the focused tests on main and on the change with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation on one GPU and compare for new VUID- lines. It matters here because 8-bit images on a 10-bit SDR display now take the GPU conversion on every present instead of the readback.
The new asserts in ResidentPresent.cpp only pin the enum returned by ResidentPresentPath. Nothing fails if the 8-bit to 10-bit conversion produces wrong values; a check on the converted output for one sRGB and one UNORM source would cover that.
|
@itsbo5 I reviewed 06e5df1. The routing change is small, but it can alter what is presented, and nothing on this head shows the pixels are right.
The NVIDIA CI run on this head is clean (0 new failures, no new validation IDs, 863 GPU tests), but it does not cover pixels, so it does not settle point 1. |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
|
I added the requested pixel comparison as a cherry-pick on your head On Windows 11 with an RTX 4070 Laptop (621.01), I ran The direct comparison matched the CPU and guest-memory conversion byte for byte across four combinations of RGBA8/BGRA8 UNORM and red-low/blue-low SDR10. The off-screen presentation pass preserved the full 10-bit RGB codes in both packed output formats. Filtered scaling stayed within the existing tolerance of two code values. The Khronos 1.4.369 layer loaded in all four processes, with no VUIDs or skips. That covers the pixel check requested above. AI-assisted testing. |
|
I am closing this for now. The maintainer review of 26 Oct asked whether Convert reading the raw 8-bit RGBA word as packed 2-10-10-10 is right for what the guest memory path holds, and that is still unanswered. There has been no push since 24 Oct. Feel free to reopen with that checked at any time and we will look at it again. |
What
Present 8-bit resident storage images (
VK_FORMAT_R8G8B8A8_UNORM,VK_FORMAT_B8G8R8A8_UNORM, and their sRGB/UINT variants) on SDR 10-bit displays through the GPU conversion path (ResidentPresent::Convert) without CPU readback fallback.Previously,
ResidentPresentPathreturnedResidentPresent::NonewhenevertenBitwas true for 8-bit storage textures, even on standard SDR displays, forcingPresentableResidentto fall back to an expensive PCIe readback of the full framebuffer on every frame.PQ displays (
DisplayPq) remain on the fallback/conversion path to preserve proper PQ-to-SDR tone mapping and HDR passthrough constraints.Tested
core/libs/prx/libSceAgcDriver/tests/ResidentPresent.cpp(all decision assertions pass, including sRGB to 10-bit SDR conversion and PQ rejection).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)