st/mesa: fix assertion failures with GL_UNSIGNED_INT64_ARB (v2)
authorMarek Olšák <marek.olsak@amd.com>
Fri, 25 May 2018 20:37:29 +0000 (16:37 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 30 May 2018 00:09:00 +0000 (20:09 -0400)
Bindless texture handles can be passed via vertex attribs using this type.
They use the double codepath, so don't use st_pipe_vertex_format.

Cc: 18.0 18.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mesa/state_tracker/st_atom_array.c

index 9a0935e21a5bb3856a0ebf2ff018e061791d8e14..e4fc19eb5e271cb11fefdfedc8b7a62c2a1ad3a5 100644 (file)
@@ -324,7 +324,6 @@ static void init_velement_lowered(const struct st_vertex_program *vp,
                                   int src_offset, int instance_divisor,
                                   int vbo_index, int idx)
 {
-   const unsigned format = st_pipe_vertex_format(attrib);
    const GLubyte nr_components = attrib->Size;
 
    if (attrib->Doubles) {
@@ -358,6 +357,8 @@ static void init_velement_lowered(const struct st_vertex_program *vp,
          }
       }
    } else {
+      const unsigned format = st_pipe_vertex_format(attrib);
+
       init_velement(&velements[idx], src_offset,
                     format, instance_divisor, vbo_index);
    }