aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-05 17:12:36 -0600
committerBrian Paul <[email protected]>2009-10-05 17:12:40 -0600
commit1a2bb37264b4448d33f2948fe1702c9dc936395d (patch)
tree61ec8715194cc7886150402265a8aef851c013ba /src/mesa/main/teximage.c
parentbbbf55fa8419549debbba9ac6dc011b2c18ef24c (diff)
mesa: lift _mesa_set_fetch_functions() calls out of drivers
Call it from in the main Mesa glTexImage functions.
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 438a316b9c1..457380b8fab 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -43,6 +43,7 @@
#include "macros.h"
#include "state.h"
#include "texcompress.h"
+#include "texfetch.h"
#include "texformat.h"
#include "teximage.h"
#include "texstate.h"
@@ -997,6 +998,9 @@ _mesa_init_teximage_fields(GLcontext *ctx, GLenum target,
img->HeightScale = (GLfloat) img->Height;
img->DepthScale = (GLfloat) img->Depth;
}
+
+ img->FetchTexelc = NULL;
+ img->FetchTexelf = NULL;
}
@@ -2200,6 +2204,8 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 1);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2314,6 +2320,8 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 2);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2424,6 +2432,8 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 3);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2732,6 +2742,8 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 1);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2807,6 +2819,8 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 2);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -3259,6 +3273,8 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
imageSize, data,
texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 1);
+
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
@@ -3363,6 +3379,8 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
border, imageSize, data,
texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 2);
+
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
@@ -3467,6 +3485,8 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
border, imageSize, data,
texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 3);
+
check_gen_mipmap(ctx, target, texObj, level);
/* state update */