Repository navigation
feat(agc): render layered draws into 2D array color views - #7254
Conversation
|
Thanks, this unblocks the first two PPSA01317 aborts nicely. We read through it: the change is confined to paths that threw on main (a layer export over a slice range), the dirty range from One ask before it can merge, a test that runs the new path. The tests added here are decode-only (they check Could you add an execution test modelled on
with a distinct colour per layer, then checks guest memory per slice after write-back, including that slice 0 is untouched in case (a)? It needs to run on Linux llvmpipe (no early skip other than "no device"), since that's the only CI lane with a Vulkan device. It would also cover the colour side of #7256. Two small optional points:
Heads-up on merge order: this conflicts textually in |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Thanks for the review. Pushed two follow-up commits: Test:
After
It only skips with no device. The Mutation check (one change at a time; each should make the test fail):
One mutation didn't fail: shrinking only the attachment view's Optional points, both done (
#7256 is rebased onto the new tip. Its tests, including On merge order: understood that this conflicts in AI-assisted: yes |
06fcd74 to
ebe289b
Compare
|
Rebased onto main 5f8d2a2 (force-push, head ebe289b). No conflicts; main's Draw.cpp/DepthSurface.cpp changes since the previous base (depth plane fill, 5_6_5 and unclamped normalized color targets) merged cleanly. Rebuilt; all 666 agc_* tests pass, including agc_driver_graphics, agc_driver_layered_array_color_draw, agc_driver_array_layer_target, agc_driver_layered_volume_, and the new agc_driver_color565_target, agc_driver_depth_plane_fill, agc_driver_native_depth_bda_clear and agc_pipeline_queue_failure_. check_conventions.py --base origin/main and check_test_registration.py are clean. AI-assisted: yes |
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
|
RTX 4090 data point on PPSA01317, continuing the chain from my #7243, #7238 and #7240 runs tonight, where the title stopped on Setup. Gran Turismo 7 PPSA01317 01.000.001 (base package), Windows 11 (26200), RTX 4090 (NVIDIA 616.92), AMD Ryzen 7 5800X, MinGW-w64 GCC 15.2.0 r7 (UCRT), Release Result. All three runs get past the layered colour draw: splash, the black loading screen with the GT spinner (title-bar counter 27 FPS, 1,134 frames at the last capture of run 3), save data mounted, three No
stderr of run 3 (warm, box idle) from the second 10 s summary to the abort, the 392 per-shader
|
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
jotitadev
left a comment
There was a problem hiding this comment.
Apple GPU / MoltenVK run. agc_driver_layered_array_color_draw runs on Metal (no skip) and passes, fails without the fix with the original refusal, and the full ^agc suite is unchanged.
Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Head ebe289b. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704.
Tested: the tree is main a373e85 + mugurc's macOS series (ci/macos-series-2) + the PRs needed to build on macOS (#6667, #6668, #7524, #6969, and two files of #7332), not plain main (it doesn't build on macOS yet). One textual conflict in Draw.cpp, in the DrawRecord declaration: that tree's main already has multisampleTargets, and this PR changes targetSlices to a slice/count pair. I kept both. #7671 was applied in the same build (disjoint files: recompiler vs driver). Base on that tree: 40 ^agc failures with MoltenVK 1.4.2 and 26 with MoltenVK main + #2704, the same known failures in every run below.
- MoltenVK exposes
VK_EXT_shader_viewport_index_layer, so the test takes the layered path here.agc_driver_layered_array_color_draw,agc_driver_graphics,agc_driver_array_layer_target, the fouragc_driver_layered_volume_*tests andagc_vertex_layer_exportpass 3 of 3 on MoltenVK 1.4.2; the new test andagc_driver_graphicsalso pass 3 of 3 on MoltenVK main + #2704. - Without the fix (the four driver files back to the base, tests kept),
agc_driver_layered_array_color_drawfails on both drivers withlayered draws into a color view of several array slices are unsupported, andagc_driver_graphicsfails on the changed decode cases. - Full
^agcsuite with the PR: 40 of 729 fail on MoltenVK 1.4.2 and 26 of 729 on MoltenVK main + #2704, the same tests as the base on each driver.
GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704)
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
Integrate the remaining array handling from Gjonn PR boykopovar#7254: validate every slice pitch, track the written layer range and exercise layered array draws. Preserve the existing full-array hazards and shared depth storage. Co-authored-by: Gjon Gojcevic <gjonn@hotmail.com>
A draw whose vertex shader exports the render target array index into a color view of several slices of a 2D array target was refused. The view now renders layers lastSlice - slice + 1 through a 2D array attachment view of the array's resident image starting at its first slice, and the draw marks every rendered slice dirty. A view of several slices of a surface that is not a 2D array is still refused, as is a layered draw without the array's resident image. AI-assisted: yes
…of its view's slices A layered draw into a color view of slices 0 to 5 of a 2D surface whose CB_COLOR_ATTRIB3 declares one slice was refused. The CB clamps the render target array index to the view's SLICE_MAX, not to the surface's slice count, so each layer is written one slice pitch further on. PPSA01317 renders a 512x512 cube map this way. Such a view now renders as a 2D array of the view's last slice + 1 slices. AI-assisted: yes
…the volume layer guard The resident image of a 2D array color view only compared the view's own slice offset with the image's layer pitch, which is trivially equal for slice 0. Every slice of the array image is now checked against the slice size DecodeColorBuffer offsets the view by. AttachmentView again requires layer 0 for a 3D target, as it did before layered 2D array views. AI-assisted: yes
A vertex shader exporting the render target index draws one value per layer into a CB_COLOR_VIEW of slices 1 to 3 of a four-slice 2D array and into slices 0 to 2 of a surface of one slice. After the write-back every slice of guest memory must hold its layer's value, and the slices outside the view (slice 0, and slice 3 of the one-slice surface) their initial bytes. AI-assisted: yes
ebe289b to
deb0ba3
Compare
|
Rebased onto current main (one adjacency conflict in |
What
PPSA01317 on
mainaborts in a 512x512 cube map pass withlayered draws into a color view of several array slices are unsupported. The draw's vertex shader exports the render target array index (PA_CL_VS_OUT_CNTLUSE_VTX_RENDER_TARGET_INDX) into aCB_COLOR_VIEWof slices 0 to 5. Only 3D color targets rendered several slices; a layered draw into any other slice range threw.Two commits:
lastSlice - slice + 1layers through a 2D array attachment view of the array's resident image, starting at the view's first slice. The draw marks every rendered slice dirty (MarkSliceDirtytakes a slice count). A layered draw into an array without its resident image throws.CB_COLOR_ATTRIB3declares one slice while the view covers slices 0 to 5, which then threw... of several slices of a surface that is not a 2D array are unsupported. The CB clamps the layer to the view'sSLICE_MAX, not to the surface's slice count, so each layer is written one slice pitch further on. Such a view now renders as a 2D array of the view's last slice + 1 slices. The "Layered color targets" debt entry is updated to match.Single-slice views and views without the layer export behave as before (the first slice of the range). A layered draw with a depth target still throws; #7256 handles that. #6959 also touches layered rendering (mesh layer windows) and keeps the refusals this PR removes; the two do not overlap.
Tested
Windows 11, NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92. Ninja/MinGW Release with
BUILD_TESTING=ON, rebased onmain922dc89.agc_driver_graphics_tests: the two decode cases that expected the refusal now require two layers (a 2D array view of slices 0 to 1 and a one-slice surface viewed as slices 0 to 1).agc_driver_array_layer_target,agc_driver_depth_plane_guest_layers,agc_driver_layered_volume_draw,agc_driver_layered_volume_submit,agc_driver_layered_volume_vertex,agc_driver_layered_volume_vertex_no_gpl,agc_vertex_layer_exportand the decode state tests (agc_driver_msaa_dcc_state, the alpha-to-coverage state tests): 11/11 pass.tools/check_conventions.py --base origin/mainandtools/check_test_registration.pypass.main(checked in boots). It then stops atlayered rendering with a depth target is unsupportedon the same pass, which feat(agc): render layered draws into a depth view of several slices #7256 handles.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)