aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-29 10:33:35 -0700
committerJason Ekstrand <[email protected]>2017-07-05 15:26:54 -0700
commit55da2cfba230f7d9680090bbc754333a53a9bb03 (patch)
treee01f00b39a121bd4efcdc1b0fd306f68d3dd2f86 /src/compiler
parent62ebca1fe61d0c93a212be0ec2451053cbb9030c (diff)
nir/spirv: Simplify type copying
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/spirv/spirv_to_nir.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 3d9ef766111..c69cb8c8a8d 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -413,10 +413,7 @@ static struct vtn_type *
vtn_type_copy(struct vtn_builder *b, struct vtn_type *src)
{
struct vtn_type *dest = ralloc(b, struct vtn_type);
- dest->type = src->type;
- dest->is_builtin = src->is_builtin;
- if (src->is_builtin)
- dest->builtin = src->builtin;
+ *dest = *src;
if (!glsl_type_is_scalar(src->type)) {
switch (glsl_get_base_type(src->type)) {
@@ -428,9 +425,6 @@ vtn_type_copy(struct vtn_builder *b, struct vtn_type *src)
case GLSL_TYPE_FLOAT:
case GLSL_TYPE_DOUBLE:
case GLSL_TYPE_ARRAY:
- dest->row_major = src->row_major;
- dest->stride = src->stride;
- dest->array_element = src->array_element;
break;
case GLSL_TYPE_STRUCT: {