X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Ftexcompress_etc.c;h=d4650109857171d6c114ca05fd3370d513b27227;hb=1ebe4305fd0e4b4f023eb50ca0b8229bdd7c1a5e;hp=f29561cc61ad40df3522214902b885b2644d0e50;hpb=bfcdb843830bba0190e00e35e3c5c18c4bdb5de1;p=mesa.git 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];