diff options
author | Mathias Fröhlich <[email protected]> | 2016-08-24 08:45:05 +0200 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-02-23 05:33:43 +0100 |
commit | 08c7474189da25729e4e0bc8755b676e13c2c2c8 (patch) | |
tree | 15c2aa92d5f5c54d8124dcf0fde8ea99990c6a38 /src/mesa/main/arrayobj.c | |
parent | ce3d2421a0bc0dd2e99fa6a54a127ca5fc57ba15 (diff) |
mesa: Introduce a yet unused _DrawVAO.
During the patch series this VAO gets populated with either the currently
bound VAO or an internal VAO that will be used for immediate mode and
dlist rendering.
v2: More comments about the _DrawVAO, filter and enabled mask.
Rename _DrawVAOEnabled to _DrawVAOEnabledAttribs.
v3: Fix and move comment.
Signed-off-by: Mathias Fröhlich <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r-- | src/mesa/main/arrayobj.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index a6fa33c82c8..cf9c5d7ecc7 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -49,6 +49,7 @@ #include "arrayobj.h" #include "macros.h" #include "mtypes.h" +#include "state.h" #include "varray.h" #include "main/dispatch.h" #include "util/bitscan.h" @@ -578,6 +579,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, bool no_error) * deleted. */ _mesa_set_drawing_arrays(ctx, NULL); + _mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0); ctx->NewState |= _NEW_ARRAY; _mesa_reference_vao(ctx, &ctx->Array.VAO, newObj); @@ -629,6 +631,8 @@ delete_vertex_arrays(struct gl_context *ctx, GLsizei n, const GLuint *ids) if (ctx->Array.LastLookedUpVAO == obj) _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, NULL); + if (ctx->Array._DrawVAO == obj) + _mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0); /* Unreference the array object. * If refcount hits zero, the object will be deleted. |