summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-04-24 03:00:17 +0000
committerBrian Paul <[email protected]>2001-04-24 03:00:17 +0000
commit29acfe5bd40e1741c07959c4b44a9bf46d250283 (patch)
tree2370b5fc78b9bd4815e39f9ec931de87da1fa0af
parentad608fe44d1593b4283719e885122260f2776212 (diff)
assign texImage->FetchTexel only if NULL
-rw-r--r--src/mesa/main/teximage.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 349e857743e..723d74d7aae 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1,4 +1,4 @@
-/* $Id: teximage.c,v 1.92 2001/04/19 22:39:50 brianp Exp $ */
+/* $Id: teximage.c,v 1.93 2001/04/24 03:00:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1348,7 +1348,10 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
}
ASSERT(texImage->TexFormat);
- texImage->FetchTexel = texImage->TexFormat->FetchTexel1D;
+ if (!texImage->FetchTexel) {
+ /* If driver didn't explicitly set this, use the default */
+ texImage->FetchTexel = texImage->TexFormat->FetchTexel1D;
+ }
ASSERT(texImage->FetchTexel);
/* state update */
@@ -1458,7 +1461,10 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
}
ASSERT(texImage->TexFormat);
- texImage->FetchTexel = texImage->TexFormat->FetchTexel2D;
+ if (!texImage->FetchTexel) {
+ /* If driver didn't explicitly set this, use the default */
+ texImage->FetchTexel = texImage->TexFormat->FetchTexel2D;
+ }
ASSERT(texImage->FetchTexel);
/* state update */
@@ -1562,7 +1568,10 @@ _mesa_TexImage3D( GLenum target, GLint level, GLenum internalFormat,
}
ASSERT(texImage->TexFormat);
- texImage->FetchTexel = texImage->TexFormat->FetchTexel3D;
+ if (!texImage->FetchTexel) {
+ /* If driver didn't explicitly set this, use the default */
+ texImage->FetchTexel = texImage->TexFormat->FetchTexel3D;
+ }
ASSERT(texImage->FetchTexel);
/* state update */
@@ -1801,7 +1810,10 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
x, y, width, border);
ASSERT(texImage->TexFormat);
- texImage->FetchTexel = texImage->TexFormat->FetchTexel1D;
+ if (!texImage->FetchTexel) {
+ /* If driver didn't explicitly set this, use the default */
+ texImage->FetchTexel = texImage->TexFormat->FetchTexel1D;
+ }
ASSERT(texImage->FetchTexel);
/* state update */
@@ -1861,7 +1873,10 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
x, y, width, height, border);
ASSERT(texImage->TexFormat);
- texImage->FetchTexel = texImage->TexFormat->FetchTexel2D;
+ if (!texImage->FetchTexel) {
+ /* If driver didn't explicitly set this, use the default */
+ texImage->FetchTexel = texImage->TexFormat->FetchTexel2D;
+ }
ASSERT(texImage->FetchTexel);
/* state update */