summaryrefslogtreecommitdiff
path: root/src/mesa/main/queryobj.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2010-01-05 11:04:50 +0100
committerMichal Krol <michal@vmware.com>2010-01-05 11:04:50 +0100
commit9b21b3c52a8a7d58d08151d1a6bf25c472dec213 (patch)
treed9083b6af4e2e9b70a7fa6cd31bac45a36e0f6b6 /src/mesa/main/queryobj.c
parent543b9566bdaa48fea2df1866fa1310c1cdbcde27 (diff)
parent1f9aa38f4e2be47229d92be2c1189c2b8d9c7133 (diff)
Merge branch 'master' into instanced-arrays
Conflicts: src/gallium/auxiliary/tgsi/tgsi_dump.c src/gallium/include/pipe/p_shader_tokens.h
Diffstat (limited to 'src/mesa/main/queryobj.c')
-rw-r--r--src/mesa/main/queryobj.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index f6eb4ee7e1..387a82fc9d 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -118,15 +118,6 @@ _mesa_delete_query(GLcontext *ctx, struct gl_query_object *q)
}
-static struct gl_query_object *
-lookup_query_object(GLcontext *ctx, GLuint id)
-{
- return (struct gl_query_object *)
- _mesa_HashLookup(ctx->Query.QueryObjects, id);
-}
-
-
-
void
_mesa_init_query_object_functions(struct dd_function_table *driver)
{
@@ -196,7 +187,7 @@ _mesa_DeleteQueriesARB(GLsizei n, const GLuint *ids)
for (i = 0; i < n; i++) {
if (ids[i] > 0) {
- struct gl_query_object *q = lookup_query_object(ctx, ids[i]);
+ struct gl_query_object *q = _mesa_lookup_query_object(ctx, ids[i]);
if (q) {
ASSERT(!q->Active); /* should be caught earlier */
_mesa_HashRemove(ctx->Query.QueryObjects, ids[i]);
@@ -213,7 +204,7 @@ _mesa_IsQueryARB(GLuint id)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
- if (id && lookup_query_object(ctx, id))
+ if (id && _mesa_lookup_query_object(ctx, id))
return GL_TRUE;
else
return GL_FALSE;
@@ -260,7 +251,7 @@ _mesa_BeginQueryARB(GLenum target, GLuint id)
return;
}
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q) {
/* create new object */
q = ctx->Driver.NewQueryObject(ctx, id);
@@ -386,7 +377,7 @@ _mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (id)
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -426,7 +417,7 @@ _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (id)
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -469,7 +460,7 @@ _mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (id)
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -506,7 +497,7 @@ _mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (id)
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,