summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2009-08-28 20:10:05 -0700
committerIan Romanick <[email protected]>2009-09-03 11:22:46 -0700
commitf37070bab6af350caec905ea7658e9241042b6cc (patch)
tree9b0795346b9b6a9ce669328a7ba347adb8bb9dba /src/mesa/main/get.c
parent96bdd993ec2e02da676b2f7c6a15017e022e7185 (diff)
ARB sync: Add support for GL_ARB_sync to swrast
This isn't quite right yet. The delete behavior and the context clean-up needs some work.
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index fc742c4a90d..477ed010304 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -19,6 +19,9 @@
#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
+#define INT64_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
+#define INT64_TO_INT(I) ( (GLint)((I > INT_MAX) ? INT_MAX : ((I < INT_MIN) ? INT_MIN : (I))) )
+
#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
#define BOOLEAN_TO_INT64(B) ( (GLint64) (B) )
#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
@@ -1887,6 +1890,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
CHECK_EXT1(ARB_seamless_cube_map, "GetBooleanv");
params[0] = ctx->Texture.CubeMapSeamless;
break;
+ case GL_MAX_SERVER_WAIT_TIMEOUT:
+ CHECK_EXT1(ARB_sync, "GetBooleanv");
+ params[0] = INT64_TO_BOOLEAN(ctx->Const.MaxServerWaitTimeout);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
}
@@ -3714,6 +3721,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
CHECK_EXT1(ARB_seamless_cube_map, "GetFloatv");
params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.CubeMapSeamless);
break;
+ case GL_MAX_SERVER_WAIT_TIMEOUT:
+ CHECK_EXT1(ARB_sync, "GetFloatv");
+ params[0] = (GLfloat)(ctx->Const.MaxServerWaitTimeout);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
}
@@ -5541,6 +5552,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
CHECK_EXT1(ARB_seamless_cube_map, "GetIntegerv");
params[0] = BOOLEAN_TO_INT(ctx->Texture.CubeMapSeamless);
break;
+ case GL_MAX_SERVER_WAIT_TIMEOUT:
+ CHECK_EXT1(ARB_sync, "GetIntegerv");
+ params[0] = INT64_TO_INT(ctx->Const.MaxServerWaitTimeout);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
}
@@ -7369,6 +7384,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
CHECK_EXT1(ARB_seamless_cube_map, "GetInteger64v");
params[0] = BOOLEAN_TO_INT64(ctx->Texture.CubeMapSeamless);
break;
+ case GL_MAX_SERVER_WAIT_TIMEOUT:
+ CHECK_EXT1(ARB_sync, "GetInteger64v");
+ params[0] = ctx->Const.MaxServerWaitTimeout;
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetInteger64v(pname=0x%x)", pname);
}