radeonsi: update dirty_level_mask before dispatching
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 29 Aug 2017 15:37:14 +0000 (17:37 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 30 Aug 2017 07:33:55 +0000 (09:33 +0200)
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 <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeonsi/si_compute.c

index 59886ecccc6335c7ee9647cb51e8c0c78e89b31f..d76d4a13841ed8755c415cc78cac96ad8d6659e9 100644 (file)
@@ -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;
index 3ebd22c3c16c11719a6215d4babb2716534e09c8..ca334949d77f746f3d55eadbd453e139a97c6802 100644 (file)
@@ -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. */