spirv: Initialize struct member offsets to -1
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 9 Jan 2019 00:19:33 +0000 (18:19 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 22 Jan 2019 16:42:56 +0000 (10:42 -0600)
This is the "no offset specified" value.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/compiler/spirv/spirv_to_nir.c

index 5013a9c..6b01ad3 100644 (file)
@@ -1236,6 +1236,7 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
             .type = val->type->members[i]->type,
             .name = ralloc_asprintf(b, "field%d", i),
             .location = -1,
+            .offset = -1,
          };
       }