diff options
author | Jason Ekstrand <[email protected]> | 2017-08-22 19:58:59 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-11-07 10:37:52 -0800 |
commit | 3ee91ee6ac739f7ad4d5d4b066073efbeb511b41 (patch) | |
tree | b11171839e3759db0e8412e27af05c44a1ba4bb7 /src/compiler/glsl | |
parent | ad127afcfd5e7d6fb98e7cf2ae02333249d31fb2 (diff) |
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 <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index a7dfe57636d..caea2ea3b2b 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -1165,6 +1165,7 @@ nir_visitor::visit(ir_call *ir) case nir_intrinsic_ballot: { nir_ssa_dest_init(&instr->instr, &instr->dest, ir->return_deref->type->vector_elements, 64, NULL); + instr->num_components = ir->return_deref->type->vector_elements; ir_rvalue *value = (ir_rvalue *) ir->actual_parameters.get_head(); instr->src[0] = nir_src_for_ssa(evaluate_rvalue(value)); |