st/glsl_to_tgsi: fix conditional assignments to packed shader outputs
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 22 Sep 2017 14:59:08 +0000 (16:59 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 29 Sep 2017 09:42:59 +0000 (11:42 +0200)
commit8ea7d3a5c8ea0c530d7f66a9bdd0fb12c59418bc
treecaaca0206a15599db7b710f85e5c322d0d3b5974
parent2703fa613b674184ad94b077ae68ad04160ba9d5
st/glsl_to_tgsi: fix conditional assignments to packed shader outputs

Overriding the default (no-op) swizzle is clearly counter-productive,
since the whole point is putting the destination register as one of
the source operands so that it remains unmodified when the assignment
condition is false.

Fragment depth and stencil outputs are a special case due to how their
source swizzles are manipulated in translate_src when compiling to
TGSI.

Fixes dEQP-GLES2.functional.shaders.conditionals.if.*_vertex
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp