mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
radv: only init the TC-compat ZRANGE metadata for the depth aspect
With separate depth/stencil layouts, if the depth aspect is first
initialized and then cleared, the ZRANGE_PRECISION metadata might
be different than 0. Initializing it again for the stencil aspect
will overwrite the value.
Fixes rendering glitches with Scarlet Nexus on GFX8-9.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5052
Cc: 21.1 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11883>
(cherry picked from commit 1ea156f44c)
This commit is contained in:
parent
53d04c4f8b
commit
2afdee0cdb
2 changed files with 2 additions and 2 deletions
|
|
@ -1867,7 +1867,7 @@
|
|||
"description": "radv: only init the TC-compat ZRANGE metadata for the depth aspect",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5956,7 +5956,7 @@ radv_initialize_htile(struct radv_cmd_buffer *cmd_buffer, struct radv_image *ima
|
|||
|
||||
radv_set_ds_clear_metadata(cmd_buffer, image, range, value, aspects);
|
||||
|
||||
if (radv_image_is_tc_compat_htile(image)) {
|
||||
if (radv_image_is_tc_compat_htile(image) && (range->aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT)) {
|
||||
/* Initialize the TC-compat metada value to 0 because by
|
||||
* default DB_Z_INFO.RANGE_PRECISION is set to 1, and we only
|
||||
* need have to conditionally update its value when performing
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue