radeonsi: don't flush CB in si_launch_grid_internal_images if not needed

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:
Marek Olšák 2024-04-12 17:51:52 -04:00 committed by Marge Bot
parent 708f57e681
commit f0160443a2

View file

@ -604,9 +604,11 @@ static void si_launch_grid_internal_images(struct si_context *sctx,
}
/* This must be done before the compute shader. */
for (unsigned i = 0; i < num_images; i++) {
si_make_CB_shader_coherent(sctx, images[i].resource->nr_samples, true,
((struct si_texture*)images[i].resource)->surface.u.gfx9.color.dcc.pipe_aligned);
if (flags & SI_OP_SYNC_PS_BEFORE) {
for (unsigned i = 0; i < num_images; i++) {
si_make_CB_shader_coherent(sctx, images[i].resource->nr_samples, true,
((struct si_texture*)images[i].resource)->surface.u.gfx9.color.dcc.pipe_aligned);
}
}
si_launch_grid_internal(sctx, info, shader, flags | SI_OP_CS_IMAGE);