aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_etc.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-04-08 14:10:45 -0600
committerBrian Paul <[email protected]>2014-04-08 14:17:40 -0600
commit6f059725fa04aaea7881e2f574cdedad550d6bc9 (patch)
tree13222ee9bc741b17459c7951540f7fee25f016cb /src/mesa/main/texcompress_etc.c
parentec1baea95a4a654de5c80089b01e0e8f38f7129a (diff)
mesa: move declaration before code in etc2_unpack_rgb8()
To fix MSVC build since cb4ad1368551b.
Diffstat (limited to 'src/mesa/main/texcompress_etc.c')
-rw-r--r--src/mesa/main/texcompress_etc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c
index 75019820577..ae973b001d6 100644
--- a/src/mesa/main/texcompress_etc.c
+++ b/src/mesa/main/texcompress_etc.c
@@ -685,15 +685,15 @@ etc2_unpack_rgb8(uint8_t *dst_row,
const unsigned h = MIN2(bh, height - y);
for (x = 0; x < width; x+= bw) {
- etc2_rgb8_parse_block(&block, src,
- false /* punchthrough_alpha */);
-
/*
* Destination texture may not be a multiple of four texels in
* width. Compute a safe width to avoid writing outside the texture.
*/
const unsigned w = MIN2(bw, width - x);
+ etc2_rgb8_parse_block(&block, src,
+ false /* punchthrough_alpha */);
+
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
for (i = 0; i < w; i++) {