[Mesa-dev] [PATCH 1/2] mesa: handle GL_UNSIGNED_INT64_ARB properly (v2)

Juan A. Suarez Romero jasuarez at igalia.com
Wed May 30 08:13:47 UTC 2018


On Mon, 2018-05-28 at 21:10 -0400, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> Bindless texture handles can be passed via vertex attribs using this type.
> This fixes a bunch of bindless piglit tests on radeonsi.
> 
> Cc: 18.0 18.1 <mesa-stable at lists.freedesktop.org>

Hello.

This patch didn't apply cleanly on 18.0, so I just fixed a small conflict.

In case you are interested in, this is the fixed commit:

https://github.com/Igalia/release-mesa/commit/81bd117b3cfbdd73181e44fbedb5e42c4c
492406


	J.A.

> ---
>  src/mesa/main/glformats.c  | 2 ++
>  src/mesa/vbo/vbo_private.h | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
> index cba5e670db0..667020c193c 100644
> --- a/src/mesa/main/glformats.c
> +++ b/src/mesa/main/glformats.c
> @@ -556,20 +556,22 @@ _mesa_bytes_per_vertex_attrib(GLint comps, GLenum type)
>     case GL_UNSIGNED_INT_2_10_10_10_REV:
>        if (comps == 4)
>           return sizeof(GLuint);
>        else
>           return -1;
>     case GL_UNSIGNED_INT_10F_11F_11F_REV:
>        if (comps == 3)
>           return sizeof(GLuint);
>        else
>           return -1;
> +   case GL_UNSIGNED_INT64_ARB:
> +      return comps * 8;
>     default:
>        return -1;
>     }
>  }
>  
>  /**
>   * Test if the given format is unsized.
>   */
>  GLboolean
>  _mesa_is_enum_format_unsized(GLenum format)
> diff --git a/src/mesa/vbo/vbo_private.h b/src/mesa/vbo/vbo_private.h
> index b69f836aa0b..3f7d0dc6082 100644
> --- a/src/mesa/vbo/vbo_private.h
> +++ b/src/mesa/vbo/vbo_private.h
> @@ -97,22 +97,22 @@ vbo_attrtype_to_integer_flag(GLenum format)
>     }
>  }
>  
>  static inline GLboolean
>  vbo_attrtype_to_double_flag(GLenum format)
>  {
>     switch (format) {
>     case GL_FLOAT:
>     case GL_INT:
>     case GL_UNSIGNED_INT:
> -   case GL_UNSIGNED_INT64_ARB:
>        return GL_FALSE;
> +   case GL_UNSIGNED_INT64_ARB:
>     case GL_DOUBLE:
>        return GL_TRUE;
>     default:
>        unreachable("Bad vertex attribute type");
>        return GL_FALSE;
>     }
>  }
>  
>  
>  /**


More information about the mesa-dev mailing list