Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
return NULL;
}
- b->shader = nir_shader_create(NULL, stage, nir_options, NULL);
+ b->shader = nir_shader_create(b, stage, nir_options, NULL);
/* Set shader info defaults */
b->shader->info.gs.invocations = 1;
nir_function *entry_point = b->entry_point->func->impl->function;
assert(entry_point);
+ /* Unparent the shader from the vtn_builder before we delete the builder */
+ ralloc_steal(NULL, b->shader);
+
ralloc_free(b);
return entry_point;