tnl: Fix green gun regression in xonotic.
authorMathias Fröhlich <mathias.froehlich@web.de>
Fri, 10 Aug 2018 09:37:43 +0000 (11:37 +0200)
committerMathias Fröhlich <Mathias.Froehlich@gmx.net>
Thu, 6 Sep 2018 12:35:12 +0000 (14:35 +0200)
Fix an other regression of
mesa: Make gl_vertex_array contain pointers to first order VAO members.
The regression showed up with drivers using the tnl module and
was reproducible using xonotic-glx -benchmark demos/the-big-keybench.dem.

Fixes: 64d2a204805
    mesa: Make gl_vertex_array contain pointers to first order VAO members.
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
src/mesa/tnl/t_split_copy.c

index cbb7eb409f9bbd87190a39ca733b826b70a29c50..085ae9a28c939c118e6d2b26e48fcaea8c40c96b 100644 (file)
@@ -531,7 +531,7 @@ replay_init(struct copy_context *copy)
    for (offset = 0, i = 0; i < copy->nr_varying; i++) {
       const struct tnl_vertex_array *src = copy->varying[i].array;
       const struct gl_array_attributes *srcattr = src->VertexAttrib;
-      struct tnl_vertex_array *dst = &copy->dstarray[i];
+      struct tnl_vertex_array *dst = &copy->dstarray[copy->varying[i].attr];
       struct gl_vertex_buffer_binding *dstbind = &copy->varying[i].dstbinding;
       struct gl_array_attributes *dstattr = &copy->varying[i].dstattribs;