gallium/radeon: R600_DEBUG=nodccfb disables separate DCC
authorMarek Olšák <marek.olsak@amd.com>
Mon, 27 Jun 2016 17:44:45 +0000 (19:44 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 29 Jun 2016 18:12:00 +0000 (20:12 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeon/r600_texture.c

index 6b701b6cdd4be32af2080e5889be616ff86618e8..5e981d617c46d87718bc18cdac366616edd3dc36 100644 (file)
@@ -572,6 +572,7 @@ static const struct debug_named_value common_debug_options[] = {
        { "mono", DBG_MONOLITHIC_SHADERS, "Use old-style monolithic shaders compiled on demand" },
        { "noce", DBG_NO_CE, "Disable the constant engine"},
        { "unsafemath", DBG_UNSAFE_MATH, "Enable unsafe math shader optimizations" },
+       { "nodccfb", DBG_NO_DCC_FB, "Disable separate DCC on the main framebuffer" },
 
        DEBUG_NAMED_VALUE_END /* must be last */
 };
index 203d863f26786e28466c8a81a4f53a95ba600296..fc50b91d685cf72330b661e6c8cf64de8433a6af 100644 (file)
 #define DBG_MONOLITHIC_SHADERS (1llu << 47)
 #define DBG_NO_CE              (1llu << 48)
 #define DBG_UNSAFE_MATH                (1llu << 49)
+#define DBG_NO_DCC_FB          (1llu << 50)
 
 #define R600_MAP_BUFFER_ALIGNMENT 64
 #define R600_MAX_VIEWPORTS        16
index d7ff2f77c336568c33cde00b34ed3da90810f567..796cbefc3e30aca9e6481f53d835138a247bc9f3 100644 (file)
@@ -2198,7 +2198,8 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
                /* Fast clear is the most appropriate place to enable DCC for
                 * displayable surfaces.
                 */
-               if (rctx->chip_class >= VI) {
+               if (rctx->chip_class >= VI &&
+                   !(rctx->screen->debug_flags & DBG_NO_DCC_FB)) {
                        vi_separate_dcc_try_enable(rctx, tex);
 
                        /* Stoney can't do a CMASK-based clear, so all clears are