[Mesa-dev] [PATCH 1/3] mesa/es3.1 : Align OpenGL ES 3.1 glBindVertexBuffer error handling with OpenGL Core
Marta Lofstedt
marta.lofstedt at linux.intel.com
Wed Aug 19 11:25:22 PDT 2015
From: Marta Lofstedt <marta.lofstedt at intel.com>
According to OpenGL ES 3.1 specification 10.3.1:
"An INVALID_OPERATION error is generated if buffer is not zero
or a name returned from a previous call to GenBuffers,
or if such a name has since been deleted with DeleteBuffers."
This error check was previously limited to OpenGL Core.
Signed-off-by: Marta Lofstedt <marta.lofstedt at intel.com>
---
src/mesa/main/bufferobj.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index e17b41c..2ca0064 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -919,7 +919,7 @@ _mesa_handle_bind_buffer_gen(struct gl_context *ctx,
{
struct gl_buffer_object *buf = *buf_handle;
- if (!buf && ctx->API == API_OPENGL_CORE) {
+ if (!buf && (ctx->API == API_OPENGL_CORE || _mesa_is_gles31(ctx))) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-gen name)", caller);
return false;
}
--
1.9.1
More information about the mesa-dev
mailing list