mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
radeonsi: fix fast depth_clear_value/stencil_clear_value
We need to update the when promoting from non-TC-compatible to TC-compatible or we'll get incorrect values in the buffer. Fixes:9defe8aca9("radeonsi: implement fast Z/S clears using clear_buffer on HTILE") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8418 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21726> (cherry picked from commit79ab787a8f)
This commit is contained in:
parent
c634916c13
commit
64bf768307
2 changed files with 15 additions and 15 deletions
|
|
@ -2245,7 +2245,7 @@
|
|||
"description": "radeonsi: fix fast depth_clear_value/stencil_clear_value",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "9defe8aca953b69615728c84d8ff6ed51bdded00"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1077,22 +1077,22 @@ static void si_fast_clear(struct si_context *sctx, unsigned *buffers,
|
|||
}
|
||||
|
||||
zstex->need_flush_after_depth_decompression = update_db_depth_clear && sctx->gfx_level == GFX10_3;
|
||||
}
|
||||
|
||||
/* Update DB_DEPTH_CLEAR. */
|
||||
if (update_db_depth_clear &&
|
||||
zstex->depth_clear_value[level] != (float)depth) {
|
||||
zstex->depth_clear_value[level] = depth;
|
||||
sctx->framebuffer.dirty_zsbuf = true;
|
||||
si_mark_atom_dirty(sctx, &sctx->atoms.s.framebuffer);
|
||||
}
|
||||
/* Update DB_DEPTH_CLEAR. */
|
||||
if (update_db_depth_clear &&
|
||||
zstex->depth_clear_value[level] != (float)depth) {
|
||||
zstex->depth_clear_value[level] = depth;
|
||||
sctx->framebuffer.dirty_zsbuf = true;
|
||||
si_mark_atom_dirty(sctx, &sctx->atoms.s.framebuffer);
|
||||
}
|
||||
|
||||
/* Update DB_STENCIL_CLEAR. */
|
||||
if (update_db_stencil_clear &&
|
||||
zstex->stencil_clear_value[level] != stencil) {
|
||||
zstex->stencil_clear_value[level] = stencil;
|
||||
sctx->framebuffer.dirty_zsbuf = true;
|
||||
si_mark_atom_dirty(sctx, &sctx->atoms.s.framebuffer);
|
||||
}
|
||||
/* Update DB_STENCIL_CLEAR. */
|
||||
if (update_db_stencil_clear &&
|
||||
zstex->stencil_clear_value[level] != stencil) {
|
||||
zstex->stencil_clear_value[level] = stencil;
|
||||
sctx->framebuffer.dirty_zsbuf = true;
|
||||
si_mark_atom_dirty(sctx, &sctx->atoms.s.framebuffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue