In __glXPushArrayState() we weren't pushing the index field.
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 11 May 2006 16:27:39 +0000 (16:27 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 11 May 2006 16:27:39 +0000 (16:27 +0000)
But later, in __glXPopArrayState(), we were using that field to set
the active_texture_unit.  The value was garbage and could lead to
things blowing up.
See bug 6863.

src/glx/x11/indirect_vertex_array.c

index 24bca425a2e3a11bf44ed4eb713f0487278c8288..5a5cd6697eaa48374087816d4486e3ea59894fc9 100644 (file)
@@ -1766,13 +1766,14 @@ __glXPushArrayState( __GLXattribute * state )
     struct array_stack_state * stack = & arrays->stack[ (arrays->stack_index * arrays->num_arrays)];
     unsigned  i;
 
-
+    /* XXX are we pushing _all_ the necessary fields? */
     for ( i = 0 ; i < arrays->num_arrays ; i++ ) {
        stack[i].data = arrays->arrays[i].data;
        stack[i].data_type = arrays->arrays[i].data_type;
        stack[i].user_stride = arrays->arrays[i].user_stride;
        stack[i].count = arrays->arrays[i].count;
        stack[i].key = arrays->arrays[i].key;
+        stack[i].index = arrays->arrays[i].index;
        stack[i].enabled = arrays->arrays[i].enabled;
     }