[Mesa-dev] [PATCH 2/2] i965: Add norbc debug option

Matt Turner mattst88 at gmail.com
Tue May 31 18:03:31 UTC 2016


On Tue, May 31, 2016 at 7:16 AM, Topi Pohjolainen
<topi.pohjolainen at intel.com> wrote:
> This INTEL_DEBUG option disables lossless compression (also known
> as render buffer compression).
>
> Suggested-by: Eero Tamminen <eero.t.tamminen at intel.com>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/intel_debug.c       | 1 +
>  src/mesa/drivers/dri/i965/intel_debug.h       | 1 +
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 ++
>  3 files changed, 4 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c
> index 2589c43..33e8402 100644
> --- a/src/mesa/drivers/dri/i965/intel_debug.c
> +++ b/src/mesa/drivers/dri/i965/intel_debug.c
> @@ -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 }
>  };
>
> diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h
> index 22ad834..f407b6a 100644
> --- a/src/mesa/drivers/dri/i965/intel_debug.h
> +++ b/src/mesa/drivers/dri/i965/intel_debug.h
> @@ -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"
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 3b032c7..32aab3a 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -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) &&

!unlikely(...) is a really weird construct. That really means that the
whole expression is... likely?

likely(!lossless_compression_disabled) seems a lot clearer.

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list