summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texfetch.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-11-18 16:15:33 -0700
committerBrian Paul <[email protected]>2010-11-18 16:15:38 -0700
commit83e93b6008213ad86607027e8434ecaccc8b1a2c (patch)
tree5817bc1a52086eea884e93b1eaf2cb60e90f66f7 /src/mesa/main/texfetch.c
parent3dcc3153b087a2ec42e6177d965dd8b2c95779c2 (diff)
mesa: pass gl_format to _mesa_init_teximage_fields()
This should prevent the field going unset in the future. See bug http://bugs.freedesktop.org/show_bug.cgi?id=31544 for background. Also remove unneeded calls to clear_teximage_fields(). Finally, call _mesa_set_fetch_functions() from the _mesa_init_teximage_fields() function so callers have one less thing to worry about.
Diffstat (limited to 'src/mesa/main/texfetch.c')
-rw-r--r--src/mesa/main/texfetch.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c
index aa3a6961b64..372ef2654a7 100644
--- a/src/mesa/main/texfetch.c
+++ b/src/mesa/main/texfetch.c
@@ -823,17 +823,11 @@ void
_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
{
ASSERT(dims == 1 || dims == 2 || dims == 3);
- ASSERT(texImage->TexFormat);
- if (!texImage->FetchTexelf) {
- texImage->FetchTexelf =
- _mesa_get_texel_fetch_func(texImage->TexFormat, dims);
- }
+ 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;
- }
+ texImage->FetchTexelc = fetch_texel_float_to_chan;
ASSERT(texImage->FetchTexelc);
ASSERT(texImage->FetchTexelf);