aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/nir
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-08-13 15:26:51 -0400
committerMarek Olšák <[email protected]>2019-08-13 18:15:53 -0400
commitfad962eddc218cf95276e6b4d335e2dce3009aec (patch)
treecf15dbb56479e6f8bfc42a3100fcc54f3cadb8e3 /src/gallium/auxiliary/nir
parent88a511bd42c22fc44f0fe49b607f3b79247192a9 (diff)
tgsi_to_nir: expand vec3 system values to vec4
for nir_intrinsic_load_work_group_id Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/nir')
-rw-r--r--src/gallium/auxiliary/nir/tgsi_to_nir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index cd8604eec71..cb03c56e406 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -655,6 +655,9 @@ ttn_src_for_file_and_index(struct ttn_compile *c, unsigned file, unsigned index,
unreachable("bad system value");
}
+ if (load->num_components == 3)
+ load = nir_swizzle(b, load, SWIZ(X, Y, Z, Z), 4);
+
src = nir_src_for_ssa(load);
b->shader->info.system_values_read |=
(1 << nir_system_value_from_intrinsic(op));