summaryrefslogtreecommitdiff
path: root/src/compiler/nir/nir_lower_system_values.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2017-08-22 19:58:59 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2017-11-07 10:37:52 -0800
commit3ee91ee6ac739f7ad4d5d4b066073efbeb511b41 (patch)
treeb11171839e3759db0e8412e27af05c44a1ba4bb7 /src/compiler/nir/nir_lower_system_values.c
parentad127afcfd5e7d6fb98e7cf2ae02333249d31fb2 (diff)
downloadmesa-3ee91ee6ac739f7ad4d5d4b066073efbeb511b41.tar.gz
nir: Make ballot intrinsics variable-size
This way they can return either a uvec4 or a uint64_t. At the moment, this is a no-op since we still always return a uint64_t. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Diffstat (limited to 'src/compiler/nir/nir_lower_system_values.c')
-rw-r--r--src/compiler/nir/nir_lower_system_values.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c
index 39b1a260bd0..48c497ef411 100644
--- a/src/compiler/nir/nir_lower_system_values.c
+++ b/src/compiler/nir/nir_lower_system_values.c
@@ -126,6 +126,7 @@ convert_block(nir_block *block, nir_builder *b)
nir_intrinsic_from_system_value(var->data.location);
nir_intrinsic_instr *load = nir_intrinsic_instr_create(b->shader, op);
nir_ssa_dest_init(&load->instr, &load->dest, 1, 64, NULL);
+ load->num_components = 1;
nir_builder_instr_insert(b, &load->instr);
sysval = &load->dest.ssa;
break;