Repository navigation
Conversation
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
A layered draw (the vertex shader exports the render target array index) with a depth target was refused. PPSA01317 renders a 512x512 cube map this way: a six-slice color view with a DB_DEPTH_VIEW of slices 0 to 5. The depth view now renders as many layers as the color views, or its own slices in a depth-only layered draw. The depth surfaces of those slices share one single-sample array image, one layer each, and the draw attaches a 2D array view of it. Each slice keeps its own Z, stencil and HTILE address, plane ownership, HTILE clears and copies, and a later draw into one slice binds that slice's layer. A depth view of another slice count than the color views, a multisampled layered depth target and one without a depth plane throw. AI-assisted: yes
Co-authored-by: gjonn <7807870+gjonn@users.noreply.github.com>
|
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Depends on: boykopovar#7254. The first four commits of this branch are boykopovar#7254's (its two changes, the review follow-up fix and its
agc_driver_layered_array_color_drawtest); this PR's own change is the last commit,feat(agc): render layered draws into a depth view of several slices.With boykopovar#7254, PPSA01317 gets through the color side of a 512x512 cube map pass and then aborts with
layered rendering with a depth target is unsupported. The draw exports the render target array index into a six-slice color view, with aDB_DEPTH_VIEWof slices 0 to 5.DepthSliceBytesand oneHtileMetadataBytesfurther per slice). Each slice also keeps its own plane ownership, HTILE clears and plane copies. A later draw into one slice binds that slice's layer. Another layered view over some of the same slices (another first slice or slice count) is a separate array image that takes each slice by a whole-slice copy when it is bound.Behaviour change on an existing path: a depth-only layered draw into a multisampled or stencil-only depth view of several slices used to render silently into the first slice. It now throws.
Open debt:
SLICE_MAX. That clamp is not modelled; such a layer is undefined in Vulkan.boykopovar#7194 changes the same HTILE slice-clear function in
DepthSurface.cpp(taking a later slice's clear when every word has ZMask 0). It works per slice and composes with the per-slice HTILE addresses here; the two branches merge without conflicts.Tested
Windows 11, NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92. Ninja/MinGW Release with
BUILD_TESTING=ON, on top of boykopovar#7254 rebased onmain922dc89.agc_driver_layered_depth_targetcovers a six-layer depth-tested draw:agc_driver_graphics_tests: new decode cases for depth-only layered views, color plus depth views of matching, shifted and mismatched slice counts, and views without the layer export staying single-layer.agc_driver_stencil_ref_exportis skipped because the device does not support it. The set is the layered depth target, graphics and decode state tests, every depth/HTILE/stencil execution test (agc_driver_depth_*,agc_driver_native_multisample_depth,agc_driver_sample_mask_depth_stencil,agc_driver_stencil_*), the array layer target test and the layered volume and vertex layer export tests.tools/check_conventions.py --base origin/mainandtools/check_test_registration.pypass.mainwith feat(agc): render layered draws into 2D array color views boykopovar/AnyPS5#7254 (checked in boots).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)