[Mesa-dev] [PATCH 1/2] i965/skl: Enable floating blend optimization

Kenneth Graunke kenneth at whitecape.org
Sat Apr 11 01:32:24 PDT 2015


On Friday, April 10, 2015 03:52:53 PM Ben Widawsky wrote:
> This optimization is disabled by default, and it is recommended to be enabled.
> The docs do not provide much info.
> 
> Cc: Ian Romanick <ian.d.romanick at intel.com>
> Cc: "Neil S. Roberts" <neil at linux.intel.com>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> ---
> 
> Notes:
>     I am enabling this optimization separately for BSW as the recommendation was
>     explicit for SKL only.
>     
>     I will get perf data and piglit data before pushing. I'd propose we plan to push
>     (with review of course) provided there are no regressions. It's possible the
>     optimization will not show up in the existing workloads I test.
> 
>  src/mesa/drivers/dri/i965/brw_state_upload.c | 6 ++++--
>  src/mesa/drivers/dri/i965/intel_reg.h        | 3 ++-
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
> index ab316bf..11098cf 100644
> --- a/src/mesa/drivers/dri/i965/brw_state_upload.c
> +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
> @@ -350,8 +350,10 @@ brw_upload_initial_gpu_state(struct brw_context *brw)
>        BEGIN_BATCH(3);
>        OUT_BATCH(MI_LOAD_REGISTER_IMM | (3 - 2));
>        OUT_BATCH(GEN7_CACHE_MODE_1);
> -      OUT_BATCH((GEN9_PARTIAL_RESOLVE_DISABLE_IN_VC << 16) |
> -                GEN9_PARTIAL_RESOLVE_DISABLE_IN_VC);
> +      OUT_BATCH((GEN9_PARTIAL_RESOLVE_DISABLE_IN_VC << 16)  |
> +                (GEN9_FLOAT_BLEND_OPTMIZATION_ENABLE << 16) |
> +                GEN9_PARTIAL_RESOLVE_DISABLE_IN_VC          |
> +                GEN9_FLOAT_BLEND_OPTMIZATION_ENABLE);
>        ADVANCE_BATCH();
>     }
>  
> diff --git a/src/mesa/drivers/dri/i965/intel_reg.h b/src/mesa/drivers/dri/i965/intel_reg.h
> index 488fb5b..235a022 100644
> --- a/src/mesa/drivers/dri/i965/intel_reg.h
> +++ b/src/mesa/drivers/dri/i965/intel_reg.h
> @@ -142,8 +142,9 @@
>  #define GEN7_3DPRIM_BASE_VERTEX         0x2440
>  
>  #define GEN7_CACHE_MODE_1               0x7004
> -# define GEN8_HIZ_NP_PMA_FIX_ENABLE        (1 << 11)
>  # define GEN8_HIZ_NP_EARLY_Z_FAILS_DISABLE (1 << 13)
> +# define GEN8_HIZ_NP_PMA_FIX_ENABLE        (1 << 11)
> +# define GEN9_FLOAT_BLEND_OPTMIZATION_ENABLE (1 << 4)
>  # define GEN9_PARTIAL_RESOLVE_DISABLE_IN_VC (1 << 1)
>  # define GEN8_HIZ_PMA_MASK_BITS \
>     ((GEN8_HIZ_NP_PMA_FIX_ENABLE | GEN8_HIZ_NP_EARLY_Z_FAILS_DISABLE) << 16)
> 

I'm not seeing much info about this either, but it sounds like we're
supposed to turn it on.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150411/e23518e2/attachment.sig>


More information about the mesa-dev mailing list