diff options
author | Dave Airlie <[email protected]> | 2017-02-15 04:51:56 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-02-16 14:11:05 +1000 |
commit | 48ebdbecc5baea98b0355f2a8c201f6357c152d9 (patch) | |
tree | 7e013550baf7ccea060f2e5a70682f81d254b52b /src/compiler/spirv/vtn_variables.c | |
parent | 7593f2ac1b65b764cdf49007553bf58dd85cd3f5 (diff) |
spirv/nir: add support for int64
This adds the spirv->nir conversion for int64 types.
Reviewed-by: Jason Ekstrand <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 16 |
1 files changed, 15 insertions, 1 deletions
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: |