mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 12:00:22 +01:00
spirv: Parent the nir_shader to the builder while building
Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Ian Romanick <idr@freedesktop.org>
This commit is contained in:
parent
1ec1ae47f7
commit
d74bec1a54
1 changed files with 4 additions and 1 deletions
|
|
@ -3351,7 +3351,7 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
|||
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;
|
||||
|
|
@ -3390,6 +3390,9 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue