mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
radeonsi: don't use si_get_flush_flags() for flushing images
si_make_{CB/DB}_shader_coherent are more correct.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
This commit is contained in:
parent
38f74d6277
commit
708f57e681
3 changed files with 14 additions and 4 deletions
|
|
@ -54,11 +54,16 @@ void si_execute_clears(struct si_context *sctx, struct si_clear_info *info,
|
|||
return;
|
||||
|
||||
/* Flush caches and wait for idle. */
|
||||
if (types & (SI_CLEAR_TYPE_CMASK | SI_CLEAR_TYPE_DCC))
|
||||
sctx->flags |= si_get_flush_flags(sctx, SI_COHERENCY_CB_META, L2_LRU);
|
||||
if (types & (SI_CLEAR_TYPE_CMASK | SI_CLEAR_TYPE_DCC)) {
|
||||
si_make_CB_shader_coherent(sctx, sctx->framebuffer.nr_samples,
|
||||
sctx->framebuffer.CB_has_shader_readable_metadata,
|
||||
sctx->framebuffer.all_DCC_pipe_aligned);
|
||||
}
|
||||
|
||||
if (types & SI_CLEAR_TYPE_HTILE)
|
||||
sctx->flags |= si_get_flush_flags(sctx, SI_COHERENCY_DB_META, L2_LRU);
|
||||
if (types & SI_CLEAR_TYPE_HTILE) {
|
||||
si_make_DB_shader_coherent(sctx, sctx->framebuffer.nr_samples, sctx->framebuffer.has_stencil,
|
||||
sctx->framebuffer.DB_has_shader_readable_metadata);
|
||||
}
|
||||
|
||||
/* Flush caches in case we use compute. */
|
||||
sctx->flags |= SI_CONTEXT_INV_VCACHE;
|
||||
|
|
|
|||
|
|
@ -804,6 +804,7 @@ struct si_framebuffer {
|
|||
bool all_DCC_pipe_aligned;
|
||||
bool has_dcc_msaa;
|
||||
bool disable_vrs_flat_shading;
|
||||
bool has_stencil;
|
||||
};
|
||||
|
||||
enum si_quant_mode
|
||||
|
|
|
|||
|
|
@ -3133,6 +3133,7 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
|
|||
sctx->framebuffer.has_dcc_msaa = false;
|
||||
sctx->framebuffer.min_bytes_per_pixel = 0;
|
||||
sctx->framebuffer.disable_vrs_flat_shading = false;
|
||||
sctx->framebuffer.has_stencil = false;
|
||||
|
||||
for (i = 0; i < state->nr_cbufs; i++) {
|
||||
if (!state->cbufs[i])
|
||||
|
|
@ -3223,6 +3224,9 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
|
|||
if (sctx->queued.named.rasterizer->uses_poly_offset &&
|
||||
surf->db_format_index != old_db_format_index)
|
||||
(sctx)->dirty_atoms |= SI_STATE_BIT(rasterizer);
|
||||
|
||||
if (util_format_has_stencil(util_format_description(zstex->buffer.b.b.format)))
|
||||
sctx->framebuffer.has_stencil = true;
|
||||
}
|
||||
|
||||
si_update_ps_colorbuf0_slot(sctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue