mesa/glthread: restore the dispatch table when incompatible gl calls are detected
[mesa.git] / src / mesa / main / glthread.h
index 98ae11509a66061cec0e225125e2bfd4b8ab277b..327c549858cd061289cd502afa98fb0eaf2387f1 100644 (file)
@@ -79,6 +79,18 @@ struct glthread_state
     * be accessed.
     */
    struct glthread_batch *batch;
+
+   /**
+    * Tracks on the main thread side whether the current vertex array binding
+    * is in a VBO.
+    */
+   bool vertex_array_is_vbo;
+
+   /**
+    * Tracks on the main thread side whether the current element array (index
+    * buffer) binding is in a VBO.
+    */
+   bool element_array_is_vbo;
 };
 
 /**
@@ -107,6 +119,7 @@ struct glthread_batch
 void _mesa_glthread_init(struct gl_context *ctx);
 void _mesa_glthread_destroy(struct gl_context *ctx);
 
+void _mesa_glthread_restore_dispatch(struct gl_context *ctx);
 void _mesa_glthread_flush_batch(struct gl_context *ctx);
 void _mesa_glthread_finish(struct gl_context *ctx);
 
@@ -126,5 +139,11 @@ static inline void
 _mesa_glthread_finish(struct gl_context *ctx)
 {
 }
+
+static inline void
+_mesa_glthread_restore_dispatch(struct gl_context *ctx);
+{
+}
+
 #endif /* !HAVE_PTHREAD */
 #endif /* _GLTHREAD_H*/