diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-10-31 14:51:15 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-10-31 14:51:15 -0600 |
commit | b345c9258b91d8a1eb86dc4c109964e060ad3ee9 (patch) | |
tree | 08fb86397232322f3d25ba2dd473446e62fcd439 /src | |
parent | f36372f0b27bdb7f99c3e5615eaf156b492dbd1d (diff) |
remove timer_query, s3tc extension bits
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/pipe/xlib/xm_api.c | 10 | ||||
-rw-r--r-- | src/mesa/pipe/xlib/xm_dd.c | 100 |
2 files changed, 0 insertions, 110 deletions
diff --git a/src/mesa/pipe/xlib/xm_api.c b/src/mesa/pipe/xlib/xm_api.c index eff84f12a7..3beb9033c9 100644 --- a/src/mesa/pipe/xlib/xm_api.c +++ b/src/mesa/pipe/xlib/xm_api.c @@ -1560,16 +1560,6 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) _mesa_enable_1_4_extensions(mesaCtx); _mesa_enable_1_5_extensions(mesaCtx); _mesa_enable_2_0_extensions(mesaCtx); -#if ENABLE_EXT_texure_compression_s3tc - if (c->Mesa_DXTn) { - _mesa_enable_extension(mesaCtx, "GL_EXT_texture_compression_s3tc"); - _mesa_enable_extension(mesaCtx, "GL_S3_s3tc"); - } - _mesa_enable_extension(mesaCtx, "GL_3DFX_texture_compression_FXT1"); -#endif -#if ENABLE_EXT_timer_query - _mesa_enable_extension(mesaCtx, "GL_EXT_timer_query"); -#endif #ifdef XFree86Server /* If we're running in the X server, do bounds checking to prevent diff --git a/src/mesa/pipe/xlib/xm_dd.c b/src/mesa/pipe/xlib/xm_dd.c index f6da1cb9f7..5a8be2e773 100644 --- a/src/mesa/pipe/xlib/xm_dd.c +++ b/src/mesa/pipe/xlib/xm_dd.c @@ -569,24 +569,6 @@ test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, /** - * In SW, we don't really compress GL_COMPRESSED_RGB[A] textures! - */ -static const struct gl_texture_format * -choose_tex_format( GLcontext *ctx, GLint internalFormat, - GLenum format, GLenum type ) -{ - switch (internalFormat) { - case GL_COMPRESSED_RGB_ARB: - return &_mesa_texformat_rgb; - case GL_COMPRESSED_RGBA_ARB: - return &_mesa_texformat_rgba; - default: - return _mesa_choose_tex_format(ctx, internalFormat, format, type); - } -} - - -/** * Called by glViewport. * This is a good time for us to poll the current X window size and adjust * our renderbuffers to match the current window size. @@ -612,76 +594,6 @@ xmesa_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) } -#if ENABLE_EXT_timer_query - -/* - * The GL_EXT_timer_query extension is not enabled for the XServer - * indirect renderer. Not sure about how/if wrapping of gettimeofday() - * is done, etc. - */ - -struct xmesa_query_object -{ - struct gl_query_object Base; - struct timeval StartTime; -}; - - -static struct gl_query_object * -xmesa_new_query_object(GLcontext *ctx, GLuint id) -{ - struct xmesa_query_object *q = CALLOC_STRUCT(xmesa_query_object); - if (q) { - q->Base.Id = id; - q->Base.Ready = GL_TRUE; - } - return &q->Base; -} - - -static void -xmesa_begin_query(GLcontext *ctx, struct gl_query_object *q) -{ - if (q->Target == GL_TIME_ELAPSED_EXT) { - struct xmesa_query_object *xq = (struct xmesa_query_object *) q; - (void) gettimeofday(&xq->StartTime, NULL); - } -} - - -/** - * Return the difference between the two given times in microseconds. - */ -#ifdef __VMS -#define suseconds_t unsigned int -#endif -static GLuint64EXT -time_diff(const struct timeval *t0, const struct timeval *t1) -{ - GLuint64EXT seconds0 = t0->tv_sec & 0xff; /* 0 .. 255 seconds */ - GLuint64EXT seconds1 = t1->tv_sec & 0xff; /* 0 .. 255 seconds */ - GLuint64EXT nanosec0 = (seconds0 * 1000000 + t0->tv_usec) * 1000; - GLuint64EXT nanosec1 = (seconds1 * 1000000 + t1->tv_usec) * 1000; - return nanosec1 - nanosec0; -} - - -static void -xmesa_end_query(GLcontext *ctx, struct gl_query_object *q) -{ - if (q->Target == GL_TIME_ELAPSED_EXT) { - struct xmesa_query_object *xq = (struct xmesa_query_object *) q; - struct timeval endTime; - (void) gettimeofday(&endTime, NULL); - /* result is in nanoseconds! */ - q->Result = time_diff(&xq->StartTime, &endTime); - } - q->Ready = GL_TRUE; -} - -#endif /* ENABLE_timer_query */ - - /** * Initialize the device driver function table with the functions * we implement in this driver. @@ -701,16 +613,4 @@ xmesa_init_driver_functions( XMesaVisual xmvisual, #endif driver->Viewport = xmesa_viewport; driver->TestProxyTexImage = test_proxy_teximage; -#if ENABLE_EXT_texure_compression_s3tc - driver->ChooseTextureFormat = choose_tex_format; -#else - (void) choose_tex_format; -#endif - -#if ENABLE_EXT_timer_query - driver->NewQueryObject = xmesa_new_query_object; - driver->BeginQuery = xmesa_begin_query; - driver->EndQuery = xmesa_end_query; -#endif - } |