mesa: Track the current vertex/element array buffers for glthread.

We want to support glthread on GLES contexts with reasonable apps, and on
desktop for apps that use VBOs but haven't completely moved to core GL.
To do so, we have to deal with the "the user may or may not pass user
pointers to draw calls" problem.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Marek Olšák <maraeo@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
This commit is contained in:
Eric Anholt
2013-03-04 10:30:15 -08:00
committed by Timothy Arceri
parent 238d027ed6
commit 012bfebc07
10 changed files with 231 additions and 34 deletions

View 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;
};
/**