[Mesa-dev] [PATCH 1/3] nir: Fix wpos_ytransform lowering state_slot swizzle.

Kenneth Graunke kenneth at whitecape.org
Wed May 18 06:33:58 UTC 2016


Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/compiler/nir/nir_lower_wpos_ytransform.c | 2 ++
 1 file changed, 2 insertions(+)

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));
 
-- 
2.8.2



More information about the mesa-dev mailing list