-/* $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
}
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 */
}
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 */
}
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 */
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 */
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 */