nir/spirv: Assert that matrix types are valid
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 11 Jan 2016 20:39:16 +0000 (12:39 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 11 Jan 2016 22:30:46 +0000 (14:30 -0800)
src/glsl/nir/spirv/spirv_to_nir.c

index 9000e895dd431b85e50c07f490cc52caebe7282d..da6c0086b9ef05a7334c8e5e2d1898a3701a20e2 100644 (file)
@@ -597,6 +597,7 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
       val->type->type = glsl_matrix_type(glsl_get_base_type(base->type),
                                          glsl_get_vector_elements(base->type),
                                          columns);
+      assert(!glsl_type_is_error(val->type->type));
       val->type->array_element = base;
       val->type->row_major = false;
       val->type->stride = 0;