[Mesa-dev] [PATCH] vbo: kill primitive restart lowering in glDrawArrays

Kenneth Graunke kenneth at whitecape.org
Tue Feb 21 16:51:24 UTC 2017


On Monday, February 20, 2017 10:35:36 AM PST Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  src/mesa/vbo/vbo_exec_array.c | 56 ++++++-------------------------------------
>  1 file changed, 7 insertions(+), 49 deletions(-)
> 
> diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
> index 6a96167..30c52d5 100644
> --- a/src/mesa/vbo/vbo_exec_array.c
> +++ b/src/mesa/vbo/vbo_exec_array.c
> @@ -404,77 +404,35 @@ vbo_bind_arrays(struct gl_context *ctx)
>   */
>  static void
>  vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
>                  GLsizei count, GLuint numInstances, GLuint baseInstance)
>  {
>     struct vbo_context *vbo = vbo_context(ctx);
>     struct _mesa_prim prim[2];
>  
>     vbo_bind_arrays(ctx);
>  
> -   /* init most fields to zero */
> +   /* OpenGL 4.5 says that primitive restart is ignored with non-indexed
> +    * draws.
> +    */

Cool!  Yes it does.  ES 3.2 also seems to agree.

i965 hardware doesn't support primitive restart on non-indexed draws (yet).
Apparently neither does AMD hardware.  NVIDIA does.  So both of us would
need this lowering...if it were required.  But it isn't, so goodbye
code! :)

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


More information about the mesa-dev mailing list