summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texfetch.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/texfetch.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/texfetch.c')
-rw-r--r--src/mesa/main/texfetch.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c
index 6b7db584f81..851659e9c53 100644
--- a/src/mesa/main/texfetch.c
+++ b/src/mesa/main/texfetch.c
@@ -595,6 +595,7 @@ fetch_texel_float_to_chan(const struct gl_texture_image *texImage,
}
+#if 0
/**
* Adaptor for fetching a float texel from a GLchan-valued texture.
*/
@@ -620,6 +621,7 @@ fetch_texel_chan_to_float(const struct gl_texture_image *texImage,
texelOut[3] = CHAN_TO_FLOAT(temp[3]);
}
}
+#endif
/**
@@ -631,17 +633,15 @@ _mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
ASSERT(dims == 1 || dims == 2 || dims == 3);
ASSERT(texImage->TexFormat);
- texImage->FetchTexelf =
- _mesa_get_texel_fetch_func(texImage->TexFormat, dims);
+ if (!texImage->FetchTexelf) {
+ texImage->FetchTexelf =
+ _mesa_get_texel_fetch_func(texImage->TexFormat, dims);
+ }
/* now check if we need to use a float/chan adaptor */
if (!texImage->FetchTexelc) {
texImage->FetchTexelc = fetch_texel_float_to_chan;
}
- else if (!texImage->FetchTexelf) {
- texImage->FetchTexelf = fetch_texel_chan_to_float;
- }
-
ASSERT(texImage->FetchTexelc);
ASSERT(texImage->FetchTexelf);