diff options
author | Rob Clark <[email protected]> | 2018-03-28 08:32:10 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-04-03 06:08:56 -0400 |
commit | 51888bf07dd2f9942708f9a265b18a129ee625f1 (patch) | |
tree | 980aa77e4a11fc7360cb734cd252a62fa13c8787 /src/compiler/spirv/spirv_to_nir.c | |
parent | 91f9450b3222469d93c270b8ca5fb4bf2ef584f2 (diff) |
nir+drivers: add helpers to get # of src/dest components
Add helpers to get the number of src/dest components for an intrinsic,
and update spots that were open-coding this logic to use the helpers
instead.
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler/spirv/spirv_to_nir.c')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 72ab426e805..b7c07064d9d 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -2434,8 +2434,7 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode, struct vtn_value *val = vtn_push_value(b, w[2], vtn_value_type_ssa); struct vtn_type *type = vtn_value(b, w[1], vtn_value_type_type)->type; - unsigned dest_components = - nir_intrinsic_infos[intrin->intrinsic].dest_components; + unsigned dest_components = nir_intrinsic_dest_components(intrin); if (intrin->intrinsic == nir_intrinsic_image_var_size) { dest_components = intrin->num_components = glsl_get_vector_elements(type->type); |