[Mesa-dev] [PATCH] i965: Clarify nomenclature: vert_result -> varying

Eric Anholt eric at anholt.net
Fri Mar 22 12:26:24 PDT 2013


Paul Berry <stereotype441 at gmail.com> writes:

> This patch removes the terminology "vert_result" from the i965 driver,
> replacing it with "varying".  The old terminology, "vert_result", was
> confusing because (a) it referred to the enum gl_vert_result, which no
> longer exists (it was replaced with gl_varying_slot), and (b) it
> implied a vertex output, but with the advent of geometry shaders, it
> could be either a vertex or a geometry output, depending what shaders
> are in use.  The generic term "varying" is less confusing.
>
> No functional change.
> ---
>  src/mesa/drivers/dri/i965/brw_clip.h           |  8 ++--
>  src/mesa/drivers/dri/i965/brw_clip_line.c      |  2 +-
>  src/mesa/drivers/dri/i965/brw_clip_tri.c       |  4 +-
>  src/mesa/drivers/dri/i965/brw_clip_unfilled.c  | 38 +++++++++---------
>  src/mesa/drivers/dri/i965/brw_clip_util.c      | 40 +++++++++----------
>  src/mesa/drivers/dri/i965/brw_context.h        | 21 +++++-----
>  src/mesa/drivers/dri/i965/brw_gs_emit.c        |  6 +--
>  src/mesa/drivers/dri/i965/brw_sf.c             |  4 +-
>  src/mesa/drivers/dri/i965/brw_sf_emit.c        | 54 +++++++++++++-------------
>  src/mesa/drivers/dri/i965/brw_vec4.h           |  4 +-
>  src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 32 +++++++--------
>  src/mesa/drivers/dri/i965/brw_vec4_vp.cpp      | 10 ++---
>  src/mesa/drivers/dri/i965/brw_vs.c             | 18 ++++-----
>  src/mesa/drivers/dri/i965/gen6_sf_state.c      | 14 +++----
>  src/mesa/drivers/dri/i965/gen7_sol_state.c     |  6 +--
>  15 files changed, 131 insertions(+), 130 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h
> index 9185651..c6581ad 100644
> --- a/src/mesa/drivers/dri/i965/brw_clip.h
> +++ b/src/mesa/drivers/dri/i965/brw_clip.h
> @@ -116,12 +116,12 @@ struct brw_clip_compile {
>  #define ATTR_SIZE  (4*4)
>  
>  /**
> - * True if the given vert_result is one of the outputs of the vertex shader.
> + * True if the given varying is one of the outputs of the vertex shader.
>   */
> -static inline bool brw_clip_have_vert_result(struct brw_clip_compile *c,
> -                                             GLuint vert_result)
> +static inline bool brw_clip_have_varying(struct brw_clip_compile *c,
> +                                         GLuint varying)
>  {
> -   return (c->key.attrs & BITFIELD64_BIT(vert_result)) ? 1 : 0;
> +   return (c->key.attrs & BITFIELD64_BIT(varying)) ? 1 : 0;
>  }
>  
>  /* Points are only culled, so no need for a clip routine, however it
> diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
> index bfb64ba..8400780 100644
> --- a/src/mesa/drivers/dri/i965/brw_clip_line.c
> +++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
> @@ -133,7 +133,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
>     struct brw_indirect newvtx1   = brw_indirect(3, 0);
>     struct brw_indirect plane_ptr = brw_indirect(4, 0);
>     struct brw_reg v1_null_ud = retype(vec1(brw_null_reg()), BRW_REGISTER_TYPE_UD);
> -   GLuint hpos_offset = brw_vert_result_to_offset(&c->vue_map,
> +   GLuint hpos_offset = brw_varying_to_offset(&c->vue_map,
>                                                    VARYING_SLOT_POS);

The sed job on this function missed lining up the following lines
(though I suspect a bunch of them don't need newlines, with the shorter
name).

Other than that,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130322/af706c27/attachment.pgp>


More information about the mesa-dev mailing list