mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 13:50:09 +01:00
if id==0 in glGetQueryObject, raise GL_INVALID_OPERATION
This commit is contained in:
parent
c99e2dd1d3
commit
deb4a63a86
1 changed files with 9 additions and 6 deletions
|
|
@ -274,11 +274,13 @@ void GLAPIENTRY
|
|||
_mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct occlusion_query *q;
|
||||
struct occlusion_query *q = NULL;
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
q = (struct occlusion_query *)
|
||||
_mesa_HashLookup(ctx->Occlusion.QueryObjects, id);
|
||||
if (id)
|
||||
q = (struct occlusion_query *)
|
||||
_mesa_HashLookup(ctx->Occlusion.QueryObjects, id);
|
||||
|
||||
if (!q || q->Active) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetQueryObjectivARB");
|
||||
return;
|
||||
|
|
@ -303,11 +305,12 @@ void GLAPIENTRY
|
|||
_mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct occlusion_query *q;
|
||||
struct occlusion_query *q = NULL;
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
q = (struct occlusion_query *)
|
||||
_mesa_HashLookup(ctx->Occlusion.QueryObjects, id);
|
||||
if (id)
|
||||
q = (struct occlusion_query *)
|
||||
_mesa_HashLookup(ctx->Occlusion.QueryObjects, id);
|
||||
if (!q || q->Active) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetQueryObjectuivARB");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue