[Mesa-dev] [PATCH] mesa: Make Geom.UsesEndPrimitive a bool instead of a GLboolean

Kenneth Graunke kenneth at whitecape.org
Fri Jun 20 17:47:27 PDT 2014


On Friday, June 20, 2014 10:01:40 AM Iago Toral Quiroga wrote:
> ---
> 
> Following Ian's comments on patch 9/23 of the multi-stream support series
> about moving away from GL types in things that are not visible to the GL
> API it makes sense to do the same for UsesEndPrimitive.
> 
>  src/mesa/main/mtypes.h    | 4 ++--
>  src/mesa/main/shaderobj.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 8b7ee30..b71bf6d 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -2176,7 +2176,7 @@ struct gl_geometry_program
>     GLenum InputType;  /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
>                             GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
>     GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
> -   GLboolean UsesEndPrimitive;
> +   bool UsesEndPrimitive;
>  };
>  
>  
> @@ -2679,7 +2679,7 @@ struct gl_shader_program
>        GLboolean UsesClipDistance;
>        GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, 
or
>                                           0 if not present. */
> -      GLboolean UsesEndPrimitive;
> +      bool UsesEndPrimitive;
>     } Geom;
>  
>     /** Vertex shader state */
> diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
> index 5712c18..c6e852c 100644
> --- a/src/mesa/main/shaderobj.c
> +++ b/src/mesa/main/shaderobj.c
> @@ -248,7 +248,7 @@ _mesa_init_shader_program(struct gl_context *ctx, struct 
gl_shader_program *prog
>     prog->Geom.VerticesOut = 0;
>     prog->Geom.InputType = GL_TRIANGLES;
>     prog->Geom.OutputType = GL_TRIANGLE_STRIP;
> -   prog->Geom.UsesEndPrimitive = GL_FALSE;
> +   prog->Geom.UsesEndPrimitive = false;
>  
>     prog->TransformFeedback.BufferMode = GL_INTERLEAVED_ATTRIBS;
>  
> 

Always glad to see more GLboolean getting replaced.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140620/b78b8cb5/attachment.sig>


More information about the mesa-dev mailing list