nir/spirv: fix a bug with structure creation
authorConnor Abbott <connor.w.abbott@intel.com>
Sat, 4 Jul 2015 22:51:24 +0000 (15:51 -0700)
committerConnor Abbott <connor.w.abbott@intel.com>
Mon, 6 Jul 2015 22:00:37 +0000 (15:00 -0700)
We were creating 2 extra bogus fields.

src/glsl/nir/spirv_to_nir.c

index ed23a9cb747e3eaa092d643a80e7c3523ba14d03..4b97a862eda9a90814e892e6a41e8c4e8e920349 100644 (file)
@@ -452,7 +452,7 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
 
       const char *name = val->name ? val->name : "struct";
 
-      val->type->type = glsl_struct_type(fields, count, name);
+      val->type->type = glsl_struct_type(fields, num_fields, name);
       return;
    }