radeonsi: update hack for HTILE corruption in ARK: Survival Evolved
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 26 Oct 2017 16:08:19 +0000 (18:08 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 27 Oct 2017 08:47:30 +0000 (10:47 +0200)
It appears that flushing the DB metadata is actually not sufficient
since the driver uses the new VS blit shaders. This looks quite
strange though, but it seems like we need to flush DB for fixing
the corruption.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102955
Fixes: 69ccb9dae7 (radeonsi: use new VS blit shaders (VS inputs in SGPRs)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/driinfo_radeonsi.h
src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/util/drirc
src/util/xmlpool/t_options.h

index 402d3406d45a2f739186a716f82bd03005fccd32..7f57b4ea892cd3de84f894cfe83c6223c0545a33 100644 (file)
@@ -6,5 +6,5 @@ DRI_CONF_SECTION_PERFORMANCE
 DRI_CONF_SECTION_END
 
 DRI_CONF_SECTION_DEBUG
-   DRI_CONF_RADEONSI_CLEAR_DB_META_BEFORE_CLEAR("false")
+   DRI_CONF_RADEONSI_CLEAR_DB_CACHE_BEFORE_CLEAR("false")
 DRI_CONF_SECTION_END
index fd8559ac98c3dd45a135568736fb34c5d4d6f058..abf25b605e800b9de8593096f9d317cff64dad76 100644 (file)
@@ -901,16 +901,16 @@ static void si_clear(struct pipe_context *ctx, unsigned buffers,
                 * corruption in ARK: Survival Evolved, but that may just be
                 * a coincidence and the root cause is elsewhere.
                 *
-                * The corruption can be fixed by putting the DB metadata flush
-                * before or after the depth clear. (suprisingly)
+                * The corruption can be fixed by putting the DB flush before
+                * or after the depth clear. (surprisingly)
                 *
                 * https://bugs.freedesktop.org/show_bug.cgi?id=102955 (apitrace)
                 *
                 * This hack decreases back-to-back ClearDepth performance.
                 */
-               if (sctx->screen->clear_db_meta_before_clear)
-                       sctx->b.flags |= SI_CONTEXT_FLUSH_AND_INV_DB_META |
-                                        SI_CONTEXT_PS_PARTIAL_FLUSH;
+               if (sctx->screen->clear_db_cache_before_clear) {
+                       sctx->b.flags |= SI_CONTEXT_FLUSH_AND_INV_DB;
+               }
        }
 
        si_blitter_begin(ctx, SI_CLEAR);
index 759d5394719465a4209814927c4b5e8eb759fee9..a6c3aa03d305b039a7410ef9b5de3eb485ae5058 100644 (file)
@@ -1072,8 +1072,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
                driQueryOptionb(config->options, "radeonsi_assume_no_z_fights");
        sscreen->commutative_blend_add =
                driQueryOptionb(config->options, "radeonsi_commutative_blend_add");
-       sscreen->clear_db_meta_before_clear =
-               driQueryOptionb(config->options, "radeonsi_clear_db_meta_before_clear");
+       sscreen->clear_db_cache_before_clear =
+               driQueryOptionb(config->options, "radeonsi_clear_db_cache_before_clear");
        sscreen->has_msaa_sample_loc_bug = (sscreen->b.family >= CHIP_POLARIS10 &&
                                            sscreen->b.family <= CHIP_POLARIS12) ||
                                           sscreen->b.family == CHIP_VEGA10 ||
index c162a0fcd629463e6e54b7a5acf628951a1b6f66..8d7703b0e4b0f150d4dd1badd202b20c84724374 100644 (file)
@@ -98,7 +98,7 @@ struct si_screen {
        bool                            has_out_of_order_rast;
        bool                            assume_no_z_fights;
        bool                            commutative_blend_add;
-       bool                            clear_db_meta_before_clear;
+       bool                            clear_db_cache_before_clear;
        bool                            has_msaa_sample_loc_bug;
        bool                            dpbb_allowed;
        bool                            dfsm_allowed;
index 39ac3c858c74fdfd3dc3414310deb8f037a8c08b..05630eb1a92ab8925f2593c8e2ae4eb386d7ed85 100644 (file)
@@ -264,7 +264,7 @@ TODO: document the other workarounds.
     </device>
     <device driver="radeonsi">
         <application name="ARK: Survival Evolved (and unintentionally the UE4 demo template)" executable="ShooterGame">
-            <option name="radeonsi_clear_db_meta_before_clear" value="true" />
+            <option name="radeonsi_clear_db_cache_before_clear" value="true" />
         </application>
     </device>
 </driconf>
index 957ed6150484fd3a558ee988bcbbbf54e4171121..41f6ebd62d30e1041d09c453cdbbd4171840c19e 100644 (file)
@@ -444,7 +444,7 @@ DRI_CONF_OPT_BEGIN_B(radeonsi_commutative_blend_add, def) \
         DRI_CONF_DESC(en,gettext("Commutative additive blending optimizations (may cause rendering errors)")) \
 DRI_CONF_OPT_END
 
-#define DRI_CONF_RADEONSI_CLEAR_DB_META_BEFORE_CLEAR(def) \
-DRI_CONF_OPT_BEGIN_B(radeonsi_clear_db_meta_before_clear, def) \
-        DRI_CONF_DESC(en,"Clear DB metadata cache before fast depth clear") \
+#define DRI_CONF_RADEONSI_CLEAR_DB_CACHE_BEFORE_CLEAR(def) \
+DRI_CONF_OPT_BEGIN_B(radeonsi_clear_db_cache_before_clear, def) \
+        DRI_CONF_DESC(en,"Clear DB cache before fast depth clear") \
 DRI_CONF_OPT_END