diff options
author | Ian Romanick <[email protected]> | 2012-08-17 17:12:39 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-29 15:09:37 -0700 |
commit | 843b876ba3e01af73ea4ca55a529911448c10b2a (patch) | |
tree | f311be4b80cbee5c1eacb90edf220651b5695313 | |
parent | 792214e8d45675b756e02a5e39bfe2ab32f7383d (diff) |
mesa: Allow NULL vertex pointer without a VBO
There is text in the OpenGL 3.x specs to explicitly allow this case.
Weird.
Signed-off-by: Ian Romanick <[email protected]>
-rw-r--r-- | src/mesa/main/varray.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index bb185aee9b9..91452b75fa6 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -233,11 +233,20 @@ update_array(struct gl_context *ctx, return; } - if (ctx->Array.ArrayObj->ARBsemantics && + /* Page 29 (page 44 of the PDF) of the OpenGL 3.3 spec says: + * + * "An INVALID_OPERATION error is generated under any of the following + * conditions: + * + * ... + * + * * any of the *Pointer commands specifying the location and + * organization of vertex array data are called while zero is bound + * to the ARRAY_BUFFER buffer object binding point (see section + * 2.9.6), and the pointer argument is not NULL." + */ + if (ptr != NULL && ctx->Array.ArrayObj->ARBsemantics && !_mesa_is_bufferobj(ctx->Array.ArrayBufferObj)) { - /* GL_ARB_vertex_array_object requires that all arrays reside in VBOs. - * Generate GL_INVALID_OPERATION if that's not true. - */ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-VBO array)", func); return; } |