radeonsi: disable primitive binning for all blitter ops
authorMarek Olšák <marek.olsak@amd.com>
Thu, 3 May 2018 01:03:44 +0000 (21:03 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 24 May 2018 17:41:56 +0000 (13:41 -0400)
same as amdvlk.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_state_binning.c

index 6f4cd1f9044e62d33e496ea339e792995b5ab6bd..fe059b3657735b7bb204038eac88b9a00de59d0b 100644 (file)
@@ -75,10 +75,20 @@ void si_blitter_begin(struct si_context *sctx, enum si_blitter_op op)
 
        if (op & SI_DISABLE_RENDER_COND)
                sctx->render_cond_force_off = true;
+
+       if (sctx->screen->dpbb_allowed) {
+               sctx->dpbb_force_off = true;
+               si_mark_atom_dirty(sctx, &sctx->atoms.s.dpbb_state);
+       }
 }
 
 void si_blitter_end(struct si_context *sctx)
 {
+       if (sctx->screen->dpbb_allowed) {
+               sctx->dpbb_force_off = false;
+               si_mark_atom_dirty(sctx, &sctx->atoms.s.dpbb_state);
+       }
+
        sctx->render_cond_force_off = false;
 
        /* Restore shader pointers because the VS blit shader changed all
index 6917d5e606813fa5af5387943af4a6daf4f240ab..5d1671fb87f355521661c97d8cd178c628703419 100644 (file)
@@ -927,7 +927,7 @@ struct si_context {
        /* Other state */
        bool need_check_render_feedback;
        bool                    decompression_enabled;
-
+       bool                    dpbb_force_off;
        bool                    vs_writes_viewport_index;
        bool                    vs_disables_clipping_viewport;
 
index 80b1137fd0c90b9193cc3bee9f9826e510975d5a..2605b59bbef004d19b8caac9707ae39bd87499eb 100644 (file)
@@ -343,7 +343,7 @@ void si_emit_dpbb_state(struct si_context *sctx)
 
        assert(sctx->chip_class >= GFX9);
 
-       if (!sscreen->dpbb_allowed || !blend || !dsa) {
+       if (!sscreen->dpbb_allowed || !blend || !dsa || sctx->dpbb_force_off) {
                si_emit_dpbb_disable(sctx);
                return;
        }