On Mon, Oct 30, 2017 at 12:54:43AM -0700, Kenneth Graunke wrote:
> Due to a gaffe on my part, we were re-emitting all binding table entries
> on every single draw call.  The push_constant_packets atom listens to
> BRW_NEW_DRAW_CALL, but skips emitting 3DSTATE_CONSTANT_XS for each stage
> unless stage_state->push_constants_dirty is true.  However, it flagged
> BRW_NEW_SURFACES unconditionally at the end, by mistake.
> 
> Instead, it should only flag it if we actually emit 3DSTATE_CONSTANT_XS
> for a stage.  We can move it a few lines up, inside the loop - the early
> continues will skip over it if push constants aren't dirty for a stage.
> 
> With INTEL_NO_HW=1 set, improves performance of GFXBench5 gl_driver_2
> on Apollolake at 1280x720 by 1.01122% +/- 0.470723% (n=35).
> ---
>  src/mesa/drivers/dri/i965/genX_state_upload.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c 
> b/src/mesa/drivers/dri/i965/genX_state_upload.c
> index 98f69522de5..b7a6cd73619 100644
> --- a/src/mesa/drivers/dri/i965/genX_state_upload.c
> +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
> @@ -3117,9 +3117,8 @@ genX(upload_push_constant_packets)(struct brw_context 
> *brw)
>        }
>  
>        stage_state->push_constants_dirty = false;
> +      brw->ctx.NewDriverState |= GEN_GEN >= 9 ? BRW_NEW_SURFACES : 0;
>     }
> -
> -   brw->ctx.NewDriverState |= GEN_GEN >= 9 ? BRW_NEW_SURFACES : 0;

Reviewed-by: Rafael Antognolli <rafael.antogno...@intel.com>

>  }
>  
>  const struct brw_tracked_state genX(push_constant_packets) = {
> -- 
> 2.14.3
> 
> _______________________________________________
> 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

Reply via email to