From da9f65268db5d0468f91860d9ef9f244587c7f48 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 15 Sep 2005 01:06:19 +0000 Subject: New set_fetch_functions() to set a gl_texture_image's FetchTexel functions from the gl_texture_format's functions. Added "adaptor" functions to allow sampling a float-valued texture with GLchans and vice versa. This will allow trimming down the number of texture fetch routines. --- src/mesa/main/teximage.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'src/mesa/main/teximage.c') diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index d4d023acda..c19e5b0a5a 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2090,14 +2090,6 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, ASSERT(texImage->TexFormat); - /* If driver didn't explicitly set this, use the defaults */ - if (!texImage->FetchTexelc) - texImage->FetchTexelc = texImage->TexFormat->FetchTexel1D; - if (!texImage->FetchTexelf) - texImage->FetchTexelf = texImage->TexFormat->FetchTexel1Df; - ASSERT(texImage->FetchTexelc); - ASSERT(texImage->FetchTexelf); - /* state update */ texObj->Complete = GL_FALSE; ctx->NewState |= _NEW_TEXTURE; @@ -2189,14 +2181,6 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, ASSERT(texImage->TexFormat); - /* If driver didn't explicitly set these, use the defaults */ - if (!texImage->FetchTexelc) - texImage->FetchTexelc = texImage->TexFormat->FetchTexel2D; - if (!texImage->FetchTexelf) - texImage->FetchTexelf = texImage->TexFormat->FetchTexel2Df; - ASSERT(texImage->FetchTexelc); - ASSERT(texImage->FetchTexelf); - /* state update */ texObj->Complete = GL_FALSE; ctx->NewState |= _NEW_TEXTURE; @@ -2284,14 +2268,6 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, ASSERT(texImage->TexFormat); - /* If driver didn't explicitly set these, use the defaults */ - if (!texImage->FetchTexelc) - texImage->FetchTexelc = texImage->TexFormat->FetchTexel3D; - if (!texImage->FetchTexelf) - texImage->FetchTexelf = texImage->TexFormat->FetchTexel3Df; - ASSERT(texImage->FetchTexelc); - ASSERT(texImage->FetchTexelf); - /* state update */ texObj->Complete = GL_FALSE; ctx->NewState |= _NEW_TEXTURE; @@ -2519,14 +2495,6 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, ASSERT(texImage->TexFormat); - /* If driver didn't explicitly set these, use the defaults */ - if (!texImage->FetchTexelc) - texImage->FetchTexelc = texImage->TexFormat->FetchTexel1D; - if (!texImage->FetchTexelf) - texImage->FetchTexelf = texImage->TexFormat->FetchTexel1Df; - ASSERT(texImage->FetchTexelc); - ASSERT(texImage->FetchTexelf); - /* state update */ texObj->Complete = GL_FALSE; ctx->NewState |= _NEW_TEXTURE; @@ -2581,14 +2549,6 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, ASSERT(texImage->TexFormat); - /* If driver didn't explicitly set these, use the defaults */ - if (!texImage->FetchTexelc) - texImage->FetchTexelc = texImage->TexFormat->FetchTexel2D; - if (!texImage->FetchTexelf) - texImage->FetchTexelf = texImage->TexFormat->FetchTexel2Df; - ASSERT(texImage->FetchTexelc); - ASSERT(texImage->FetchTexelf); - /* state update */ texObj->Complete = GL_FALSE; ctx->NewState |= _NEW_TEXTURE; -- cgit v1.2.3