From 59101e771d63d3d623828a173454fdbbcb719ec3 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 29 Aug 2017 17:37:14 +0200 Subject: [PATCH] radeonsi: update dirty_level_mask before dispatching MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes a rendering issue with Hitman when bindless textures are enabled. Fixes: 2263610827 ("radeonsi: flush DB caches only when transitioning from DB to texturing") Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- src/gallium/drivers/radeon/r600_pipe_common.h | 1 + src/gallium/drivers/radeonsi/si_compute.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 59886ecccc6..d76d4a13841 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -569,6 +569,7 @@ struct r600_common_context { unsigned gpu_reset_counter; unsigned last_dirty_tex_counter; unsigned last_compressed_colortex_counter; + unsigned last_num_draw_calls; struct threaded_context *tc; struct u_suballocator *allocator_zeroed_memory; diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 3ebd22c3c16..ca334949d77 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -782,6 +782,11 @@ static void si_launch_grid( program->shader.compilation_failed) return; + if (sctx->b.last_num_draw_calls != sctx->b.num_draw_calls) { + si_update_fb_dirtiness_after_rendering(sctx); + sctx->b.last_num_draw_calls = sctx->b.num_draw_calls; + } + si_decompress_compute_textures(sctx); /* Add buffer sizes for memory checking in need_cs_space. */ -- 2.30.2