[Mesa-dev] [PATCH] i965: Remove redundant gen check

Daniel Vetter daniel at ffwll.ch
Fri Apr 10 00:05:26 PDT 2015


On Thu, Apr 09, 2015 at 07:46:34PM -0700, Ben Widawsky wrote:
> The blit ring doesn't exist until Gen6, therefore we don't need to actually
> check it. Keep an assert to make sure old code doesn't do stupid stuff.
> 
> (Only compile tested)
> 
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> ---
>  src/mesa/drivers/dri/i965/intel_batchbuffer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
> index e522e4e..ada5573 100644
> --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
> +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
> @@ -702,7 +702,8 @@ intel_emit_post_sync_nonzero_flush(struct brw_context *brw)
>  void
>  intel_batchbuffer_emit_mi_flush(struct brw_context *brw)
>  {
> -   if (brw->batch.ring == BLT_RING && brw->gen >= 6) {
> +   if (brw->batch.ring == BLT_RING) {
> +      assert(brw->gen >= 6);
>        BEGIN_BATCH_BLT(4);
>        OUT_BATCH(MI_FLUSH_DW);
>        OUT_BATCH(0);
> -- 
> 2.3.5
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the mesa-dev mailing list