From 48ebdbecc5baea98b0355f2a8c201f6357c152d9 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 15 Feb 2017 04:51:56 +0000 Subject: spirv/nir: add support for int64 This adds the spirv->nir conversion for int64 types. Reviewed-by: Jason Ekstrand Signed-off-by: Dave Airlie --- src/compiler/spirv/vtn_variables.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/compiler/spirv/vtn_variables.c') diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index d7d882e0184..293d07d68bf 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -115,6 +115,8 @@ vtn_access_chain_to_deref(struct vtn_builder *b, struct vtn_access_chain *chain) switch (base_type) { case GLSL_TYPE_UINT: case GLSL_TYPE_INT: + case GLSL_TYPE_UINT64: + case GLSL_TYPE_INT64: case GLSL_TYPE_FLOAT: case GLSL_TYPE_DOUBLE: case GLSL_TYPE_BOOL: @@ -347,6 +349,8 @@ vtn_access_chain_to_offset(struct vtn_builder *b, switch (base_type) { case GLSL_TYPE_UINT: case GLSL_TYPE_INT: + case GLSL_TYPE_UINT64: + case GLSL_TYPE_INT64: case GLSL_TYPE_FLOAT: case GLSL_TYPE_DOUBLE: case GLSL_TYPE_BOOL: @@ -395,6 +399,8 @@ vtn_type_block_size(struct vtn_type *type) switch (base_type) { case GLSL_TYPE_UINT: case GLSL_TYPE_INT: + case GLSL_TYPE_UINT64: + case GLSL_TYPE_INT64: case GLSL_TYPE_FLOAT: case GLSL_TYPE_BOOL: case GLSL_TYPE_DOUBLE: { @@ -403,7 +409,9 @@ vtn_type_block_size(struct vtn_type *type) if (cols > 1) { assert(type->stride > 0); return type->stride * cols; - } else if (base_type == GLSL_TYPE_DOUBLE) { + } else if (base_type == GLSL_TYPE_DOUBLE || + base_type == GLSL_TYPE_UINT64 || + base_type == GLSL_TYPE_INT64) { return glsl_get_vector_elements(type->type) * 8; } else { return glsl_get_vector_elements(type->type) * 4; @@ -526,6 +534,8 @@ _vtn_block_load_store(struct vtn_builder *b, nir_intrinsic_op op, bool load, switch (base_type) { case GLSL_TYPE_UINT: case GLSL_TYPE_INT: + case GLSL_TYPE_UINT64: + case GLSL_TYPE_INT64: case GLSL_TYPE_FLOAT: case GLSL_TYPE_DOUBLE: case GLSL_TYPE_BOOL: @@ -738,6 +748,8 @@ _vtn_variable_load_store(struct vtn_builder *b, bool load, switch (base_type) { case GLSL_TYPE_UINT: case GLSL_TYPE_INT: + case GLSL_TYPE_UINT64: + case GLSL_TYPE_INT64: case GLSL_TYPE_FLOAT: case GLSL_TYPE_BOOL: case GLSL_TYPE_DOUBLE: @@ -815,6 +827,8 @@ _vtn_variable_copy(struct vtn_builder *b, struct vtn_access_chain *dest, switch (base_type) { case GLSL_TYPE_UINT: case GLSL_TYPE_INT: + case GLSL_TYPE_UINT64: + case GLSL_TYPE_INT64: case GLSL_TYPE_FLOAT: case GLSL_TYPE_DOUBLE: case GLSL_TYPE_BOOL: -- cgit v1.2.3