From: Nicolai Hähnle Date: Fri, 6 Oct 2017 18:28:43 +0000 (+0200) Subject: st/glsl_to_tgsi: the second destination doesn't support relative addressing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf3dd91969bd85f3c18d9f56d9fade70ea425a29;p=mesa.git st/glsl_to_tgsi: the second destination doesn't support relative addressing It's not used -- DFRACEXP gets array indexes of its exponent out-parameter lowered earlier -- and it wouldn't have worked correctly anyway when both dst and dst1 use relative addressing. Reviewed-by: Marek Olšák --- diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 7b81e18000a..573ce69d8fa 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -389,7 +389,7 @@ glsl_to_tgsi_visitor::emit_asm(ir_instruction *ir, unsigned op, * sources into temps. */ num_reladdr += dst.reladdr != NULL || dst.reladdr2; - num_reladdr += dst1.reladdr != NULL || dst1.reladdr2; + assert(!dst1.reladdr); /* should be lowered in earlier passes */ num_reladdr += src0.reladdr != NULL || src0.reladdr2 != NULL; num_reladdr += src1.reladdr != NULL || src1.reladdr2 != NULL; num_reladdr += src2.reladdr != NULL || src2.reladdr2 != NULL; @@ -407,10 +407,7 @@ glsl_to_tgsi_visitor::emit_asm(ir_instruction *ir, unsigned op, emit_arl(ir, address_reg2, *dst.reladdr2); num_reladdr--; } - if (dst1.reladdr) { - emit_arl(ir, address_reg, *dst1.reladdr); - num_reladdr--; - } + assert(num_reladdr == 0); /* inst->op has only 8 bits. */