summaryrefslogtreecommitdiff
path: root/src/mesa/main/texfetch.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-01-15 20:37:57 -0700
committerBrian Paul <brianp@vmware.com>2011-01-15 20:37:57 -0700
commitbfad484505e5e313895ae797fe7c24cca97331b3 (patch)
treeba59340ad560153bc90b3bca988a6634cd915fc1 /src/mesa/main/texfetch.c
parent608ccfe316a1814e784be231c324e3ef0730d9b4 (diff)
mesa: move declarations before code
Diffstat (limited to 'src/mesa/main/texfetch.c')
-rw-r--r--src/mesa/main/texfetch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c
index bbb0f8e8d2..b73cedf479 100644
--- a/src/mesa/main/texfetch.c
+++ b/src/mesa/main/texfetch.c
@@ -858,9 +858,10 @@ fetch_texel_chan_to_float(const struct gl_texture_image *texImage,
void
_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
{
- ASSERT(dims == 1 || dims == 2 || dims == 3);
GLuint format = texImage->TexFormat;
+ ASSERT(dims == 1 || dims == 2 || dims == 3);
+
if (texImage->TexObject->sRGBDecode == GL_SKIP_DECODE_EXT &&
_mesa_get_format_color_encoding(format) == GL_SRGB) {
format = _mesa_get_srgb_format_linear(format);