st/mesa: set the vbuffer to NULL if we are skipping it
authorDave Airlie <airlied@redhat.com>
Fri, 4 Sep 2015 00:24:39 +0000 (01:24 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 11 Sep 2015 02:05:42 +0000 (03:05 +0100)
If we skip a vbuffer we need to make sure we NULL out
the contents, otherwise when it gets passed to the driver
it will get confused.

This was hit by:
GL41-CTS.gpu_shader_fp64.varyings

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_atom_array.c

index 56b8019a36fbccc8956fa43c13793866d8d2571d..0847184d74df7f778d98d1e11786d04724ce65e7 100644 (file)
@@ -567,8 +567,12 @@ setup_non_interleaved_attribs(struct st_context *st,
       unsigned src_format;
 
       array = get_client_array(vp, arrays, attr);
-      if (!array)
+      if (!array) {
+         vbuffer[attr].buffer = NULL;
+         vbuffer[attr].user_buffer = NULL;
+         vbuffer[attr].buffer_offset = 0;
          continue;
+      }
 
       stride = array->StrideB;
       bufobj = array->BufferObj;