Re: [Mesa-dev] [PATCH 12/14] i965/blorp: Also skip the fast clear if the clear color differs

2018-04-03 Thread Jason Ekstrand
Oops.  This one is probably my fault. :-(

Reviewed-by: Jason Ekstrand 

On Fri, Mar 30, 2018 at 11:12 AM, Nanley Chery 
wrote:

> If the aux state is CLEAR and clear color value has changed, only the
> surface state must be updated. The bit-pattern in the aux buffer is
> exactly the same.
> ---
>  src/mesa/drivers/dri/i965/brw_blorp.c | 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c
> b/src/mesa/drivers/dri/i965/brw_blorp.c
> index c6fa5195ee3..bf7164688bb 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp.c
> +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
> @@ -1239,13 +1239,12 @@ do_single_blorp_clear(struct brw_context *brw,
> struct gl_framebuffer *fb,
>const enum isl_aux_state aux_state =
>   intel_miptree_get_aux_state(irb->mt, irb->mt_level,
> irb->mt_layer);
>
> -  bool same_clear_color =
> - !intel_miptree_set_clear_color(brw, irb->mt,
> >Color.ClearColor);
> +  intel_miptree_set_clear_color(brw, irb->mt,
> >Color.ClearColor);
>
> -  /* If the buffer is already in INTEL_FAST_CLEAR_STATE_CLEAR, the
> clear
> +  /* If the buffer is already in ISL_AUX_STATE_CLEAR, the clear
> * is redundant and can be skipped.
> */
> -  if (aux_state == ISL_AUX_STATE_CLEAR && same_clear_color)
> +  if (aux_state == ISL_AUX_STATE_CLEAR)
>   return;
>
>DBG("%s (fast) to mt %p level %d layers %d+%d\n", __FUNCTION__,
> --
> 2.16.2
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 12/14] i965/blorp: Also skip the fast clear if the clear color differs

2018-03-30 Thread Nanley Chery
If the aux state is CLEAR and clear color value has changed, only the
surface state must be updated. The bit-pattern in the aux buffer is
exactly the same.
---
 src/mesa/drivers/dri/i965/brw_blorp.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c 
b/src/mesa/drivers/dri/i965/brw_blorp.c
index c6fa5195ee3..bf7164688bb 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -1239,13 +1239,12 @@ do_single_blorp_clear(struct brw_context *brw, struct 
gl_framebuffer *fb,
   const enum isl_aux_state aux_state =
  intel_miptree_get_aux_state(irb->mt, irb->mt_level, irb->mt_layer);
 
-  bool same_clear_color =
- !intel_miptree_set_clear_color(brw, irb->mt, >Color.ClearColor);
+  intel_miptree_set_clear_color(brw, irb->mt, >Color.ClearColor);
 
-  /* If the buffer is already in INTEL_FAST_CLEAR_STATE_CLEAR, the clear
+  /* If the buffer is already in ISL_AUX_STATE_CLEAR, the clear
* is redundant and can be skipped.
*/
-  if (aux_state == ISL_AUX_STATE_CLEAR && same_clear_color)
+  if (aux_state == ISL_AUX_STATE_CLEAR)
  return;
 
   DBG("%s (fast) to mt %p level %d layers %d+%d\n", __FUNCTION__,
-- 
2.16.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev