vbo: fix resizing 64-bit vertex attributes
authorMarek Olšák <marek.olsak@amd.com>
Fri, 31 Jan 2020 21:26:42 +0000 (16:26 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 11 Feb 2020 00:34:57 +0000 (00:34 +0000)
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>

src/mesa/vbo/vbo_private.h

index 6110a6cc0e87dec6925a868b6809a3cccd17993e..c94215a20f556cf99cf98030702a85370553099d 100644 (file)
@@ -135,6 +135,8 @@ vbo_get_default_vals_as_union(GLenum format)
 {
    static const GLfloat default_float[4] = { 0, 0, 0, 1 };
    static const GLint default_int[4] = { 0, 0, 0, 1 };
+   static const GLdouble default_double[4] = { 0, 0, 0, 1 };
+   static const uint64_t default_uint64[4] = { 0, 0, 0, 1 };
 
    switch (format) {
    case GL_FLOAT:
@@ -142,6 +144,10 @@ vbo_get_default_vals_as_union(GLenum format)
    case GL_INT:
    case GL_UNSIGNED_INT:
       return (fi_type *)default_int;
+   case GL_DOUBLE:
+      return (fi_type *)default_double;
+   case GL_UNSIGNED_INT64_ARB:
+      return (fi_type *)default_uint64;
    default:
       unreachable("Bad vertex format");
       return NULL;