diff options
author | Ilia Mirkin <[email protected]> | 2016-07-08 01:35:15 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-08-18 22:48:55 -0400 |
commit | 27e59ed477b747b7b545553847692fa331055319 (patch) | |
tree | b952f1e3147c7dcb2ab9ef43d4ff0dd63fc63279 /src/mesa | |
parent | 59bb8211804a471e87d4de54264f3e19ed4f435e (diff) |
mesa: avoid valgrind warning due to opaque only being set sometimes
Valgrind complains with a "Conditional jump or move depends on
uninitialised value(s)" warning due to opaque being conditionally
initialized. However in the punchthrough_alpha == true case, it is
always initialized, so just flip the condition around to silence the
warning.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/texcompress_etc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c index f29561cc61a..d4650109857 100644 --- a/src/mesa/main/texcompress_etc.c +++ b/src/mesa/main/texcompress_etc.c @@ -458,10 +458,10 @@ etc2_rgb8_parse_block(struct etc2_block *block, /* Use same modifier tables as for etc1 textures if opaque bit is set * or if non punchthrough texture format */ - block->modifier_tables[0] = (block->opaque || !punchthrough_alpha) ? + block->modifier_tables[0] = (!punchthrough_alpha || block->opaque) ? etc1_modifier_tables[table1_idx] : etc2_modifier_tables_non_opaque[table1_idx]; - block->modifier_tables[1] = (block->opaque || !punchthrough_alpha) ? + block->modifier_tables[1] = (!punchthrough_alpha || block->opaque) ? etc1_modifier_tables[table2_idx] : etc2_modifier_tables_non_opaque[table2_idx]; |