X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fglthread.h;h=07bed380cbfd654d7c7df5843ae9339408c0a231;hb=1e37a5054b1f47a0e95183bd99b8c6a3a8be4725;hp=98ae11509a66061cec0e225125e2bfd4b8ab277b;hpb=47f819d3cb89ab90914181e3c61744ac1f16e056;p=mesa.git diff --git a/src/mesa/main/glthread.h b/src/mesa/main/glthread.h index 98ae11509a6..07bed380cbf 100644 --- a/src/mesa/main/glthread.h +++ b/src/mesa/main/glthread.h @@ -24,18 +24,17 @@ #ifndef _GLTHREAD_H #define _GLTHREAD_H -#ifdef HAVE_PTHREAD +#include "main/mtypes.h" + +/* Command size is a number of bytes stored in a short. */ +#define MARSHAL_MAX_CMD_SIZE 65535 #include #include #include -#include "main/mtypes.h" enum marshal_dispatch_cmd_id; -/* Command size is a number of bytes stored in a short. */ -#define MARSHAL_MAX_CMD_SIZE 65535 - struct glthread_state { /** The worker thread that asynchronously processes our GL commands. */ @@ -79,6 +78,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,24 +118,8 @@ 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); -#else /* HAVE_PTHREAD */ - -static inline void -_mesa_glthread_init(struct gl_context *ctx) -{ -} - -static inline void -_mesa_glthread_destroy(struct gl_context *ctx) -{ -} - -static inline void -_mesa_glthread_finish(struct gl_context *ctx) -{ -} -#endif /* !HAVE_PTHREAD */ #endif /* _GLTHREAD_H*/