From: Kenneth Graunke Date: Tue, 17 May 2016 10:05:56 +0000 (-0700) Subject: nir: Fix wpos_ytransform lowering state_slot swizzle. X-Git-Tag: upstream/17.1.0~9621 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fe9a19302b8953cb267f3a1876543ad6aef8177;p=platform%2Fupstream%2Fmesa.git nir: Fix wpos_ytransform lowering state_slot swizzle. Signed-off-by: Kenneth Graunke Reviewed-by: Rob Clark --- diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 1d53530..5546788 100644 --- a/src/compiler/nir/nir_lower_wpos_ytransform.c +++ b/src/compiler/nir/nir_lower_wpos_ytransform.c @@ -23,6 +23,7 @@ #include "nir.h" #include "nir_builder.h" +#include "program/prog_instruction.h" /* Lower gl_FragCoord (and fddy) to account for driver's requested coordinate- * origin and pixel-center vs. shader. If transformation is required, a @@ -57,6 +58,7 @@ get_transform(lower_wpos_ytransform_state *state) var->num_state_slots = 1; var->state_slots = ralloc_array(var, nir_state_slot, 1); + var->state_slots[0].swizzle = SWIZZLE_XYZW; memcpy(var->state_slots[0].tokens, state->options->state_tokens, sizeof(var->state_slots[0].tokens));