summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2019-09-18 15:12:30 -0400
committerMarek Olšák <marek.olsak@amd.com>2019-09-23 15:34:56 -0400
commit09447ccc78f5b08e161bfed9fdfdbf7dd8999d88 (patch)
treeb5df8ae375ec75da824ccd75a998039d4ee14969 /src/gallium
parent3906fce88bb473f283e4b064cc996ea6aa6d2922 (diff)
tgsi_to_nir: fix 2-component system values like tess_level_inner_default
Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/nir/tgsi_to_nir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index b92a4485e4c..88e9963e030 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -659,7 +659,9 @@ ttn_src_for_file_and_index(struct ttn_compile *c, unsigned file, unsigned index,
unreachable("bad system value");
}
- if (load->num_components == 3)
+ if (load->num_components == 2)
+ load = nir_swizzle(b, load, SWIZ(X, Y, Y, Y), 4);
+ else if (load->num_components == 3)
load = nir_swizzle(b, load, SWIZ(X, Y, Z, Z), 4);
src = nir_src_for_ssa(load);