i965: Add norbc debug option
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Tue, 31 May 2016 13:47:50 +0000 (16:47 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Wed, 1 Jun 2016 06:16:36 +0000 (09:16 +0300)
This INTEL_DEBUG option disables lossless compression (also known
as render buffer compression).

v2: (Matt) Use likely(!lossless_compression_disabled) instead of
           !likely(lossless_compression_disabled)
    (Grazvydas) Update docs/envvars.html

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
docs/envvars.html
src/mesa/drivers/dri/i965/intel_debug.c
src/mesa/drivers/dri/i965/intel_debug.h
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 253aaf2..ed957bd 100644 (file)
@@ -166,6 +166,7 @@ See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
    <li>vec4 - force vec4 mode in vertex shader</li>
    <li>spill_fs - force spilling of all registers in the scalar backend (useful to debug spilling code)</li>
    <li>spill_vec4 - force spilling of all registers in the vec4 backend (useful to debug spilling code)</li>
+   <li>norbc - disable single sampled render buffer compression</li>
 </ul>
 </ul>
 
index 2589c43..33e8402 100644 (file)
@@ -80,6 +80,7 @@ static const struct debug_control debug_control[] = {
    { "tes",         DEBUG_TES },
    { "l3",          DEBUG_L3 },
    { "do32",        DEBUG_DO32 },
+   { "norbc",       DEBUG_NO_RBC },
    { NULL,    0 }
 };
 
index 22ad834..f407b6a 100644 (file)
@@ -73,6 +73,7 @@ extern uint64_t INTEL_DEBUG;
 #define DEBUG_TES                 (1ull << 37)
 #define DEBUG_L3                  (1ull << 38)
 #define DEBUG_DO32                (1ull << 39)
+#define DEBUG_NO_RBC              (1ull << 40)
 
 #ifdef HAVE_ANDROID_PLATFORM
 #define LOG_TAG "INTEL-MESA"
index 3b032c7..b6265dc 100644 (file)
@@ -1620,7 +1620,9 @@ intel_miptree_alloc_non_msrt_mcs(struct brw_context *brw,
     * single-sampled buffers. Disabling compression allows us to skip
     * resolves.
     */
+   const bool lossless_compression_disabled = INTEL_DEBUG & DEBUG_NO_RBC;
    const bool is_lossless_compressed =
+      unlikely(!lossless_compression_disabled) &&
       brw->gen >= 9 && !mt->is_scanout &&
       intel_miptree_supports_lossless_compressed(brw, mt);