From 51888bf07dd2f9942708f9a265b18a129ee625f1 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 28 Mar 2018 08:32:10 -0400 Subject: 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 Reviewed-by: Eric Anholt --- src/compiler/spirv/spirv_to_nir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/compiler/spirv/spirv_to_nir.c') 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); -- cgit v1.2.3