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>
This commit is contained in:
Jason Ekstrand
2017-08-22 19:58:59 -07:00
parent ad127afcfd
commit 3ee91ee6ac
3 changed files with 8 additions and 6 deletions
@@ -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;