[Mesa-dev] [PATCH 13/30] i965: Combine 4 boolean args of brw_urb_WRITE into a flags bitfield.

Kenneth Graunke kenneth at whitecape.org
Tue Aug 20 12:17:02 PDT 2013


On 08/20/2013 11:30 AM, Paul Berry wrote:
> The arguments to brw_urb_WRITE() were getting pretty unwieldy, and we
> have to add more flags to support geometry shaders anyhow.
>
> Also plumb these flags through brw_clip_emit_vue(),
> brw_set_urb_message(), and the vec4_instruction class.
> ---
>   src/mesa/drivers/dri/i965/brw_clip.h           |  3 +-
>   src/mesa/drivers/dri/i965/brw_clip_line.c      |  4 +--
>   src/mesa/drivers/dri/i965/brw_clip_tri.c       |  6 ++--
>   src/mesa/drivers/dri/i965/brw_clip_unfilled.c  |  6 ++--
>   src/mesa/drivers/dri/i965/brw_clip_util.c      | 19 +++++-------
>   src/mesa/drivers/dri/i965/brw_eu.h             | 42 +++++++++++++++++++++++---
>   src/mesa/drivers/dri/i965/brw_eu_emit.c        | 32 ++++++++------------
>   src/mesa/drivers/dri/i965/brw_gs_emit.c        |  6 ++--
>   src/mesa/drivers/dri/i965/brw_sf_emit.c        | 20 +++---------
>   src/mesa/drivers/dri/i965/brw_vec4.h           |  2 +-
>   src/mesa/drivers/dri/i965/brw_vec4_emit.cpp    |  5 +--
>   src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |  2 +-
>   12 files changed, 76 insertions(+), 71 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h
> index f26d75d..5af0ad3 100644
> --- a/src/mesa/drivers/dri/i965/brw_clip.h
> +++ b/src/mesa/drivers/dri/i965/brw_clip.h
> @@ -173,8 +173,7 @@ void brw_clip_init_planes( struct brw_clip_compile *c );
>
>   void brw_clip_emit_vue(struct brw_clip_compile *c,
>   		       struct brw_indirect vert,
> -		       bool allocate,
> -		       bool eot,
> +                       unsigned flags,
>   		       GLuint header);
>
>   void brw_clip_kill_thread(struct brw_clip_compile *c);
> diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
> index 8466b1c..5238598 100644
> --- a/src/mesa/drivers/dri/i965/brw_clip_line.c
> +++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
> @@ -282,10 +282,10 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
>         brw_clip_interp_vertex(c, newvtx0, vtx0, vtx1, c->reg.t0, false);
>         brw_clip_interp_vertex(c, newvtx1, vtx1, vtx0, c->reg.t1, false);
>
> -      brw_clip_emit_vue(c, newvtx0, 1, 0,
> +      brw_clip_emit_vue(c, newvtx0, BRW_URB_WRITE_ALLOCATE_COMPLETE,

For anyone reviewing: the reason this is ALLOCATE_COMPLETE rather than 
ALLOCATE is because brw_clip_emit_vue always used to set "complete", and 
now is relying on the callers to pass that as part of flags.


More information about the mesa-dev mailing list