mesa: Fix core GL genned-name handling for glBeginQuery().
Fixes piglit gl-3.1/genned-names. NOTE: This is a candidate for the 9.0 branch. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
@@ -321,13 +321,19 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
|
||||
|
||||
q = _mesa_lookup_query_object(ctx, id);
|
||||
if (!q) {
|
||||
/* create new object */
|
||||
q = ctx->Driver.NewQueryObject(ctx, id);
|
||||
if (!q) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glBeginQuery{Indexed}");
|
||||
if (ctx->API == API_OPENGL_CORE) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBeginQuery{Indexed}(non-gen name)");
|
||||
return;
|
||||
} else {
|
||||
/* create new object */
|
||||
q = ctx->Driver.NewQueryObject(ctx, id);
|
||||
if (!q) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glBeginQuery{Indexed}");
|
||||
return;
|
||||
}
|
||||
_mesa_HashInsert(ctx->Query.QueryObjects, id, q);
|
||||
}
|
||||
_mesa_HashInsert(ctx->Query.QueryObjects, id, q);
|
||||
}
|
||||
else {
|
||||
/* pre-existing object */
|
||||
|
||||
Reference in New Issue
Block a user