intel: Drop the last uses of a mem_ctx in nir_builder_init_simple_shader().

These two consumers were the only ones out of the ~65 calls to
init_simple_shader, so there's a pretty clear consensus on how to allocate
simple shaders.  I suspect that actually these would be just fine with
b.shader being the mem_ctx, but that would take a bit more rework.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323>
This commit is contained in:
Eric Anholt
2020-10-26 11:25:08 -07:00
parent 2f372572a1
commit ef5bce9253
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -29,7 +29,8 @@ blorp_nir_init_shader(nir_builder *b,
gl_shader_stage stage,
const char *name)
{
*b = nir_builder_init_simple_shader(mem_ctx, stage, NULL);
*b = nir_builder_init_simple_shader(NULL, stage, NULL);
ralloc_adopt(mem_ctx, b->shader);
if (name != NULL)
b->shader->info.name = ralloc_strdup(b->shader, name);
if (stage == MESA_SHADER_FRAGMENT)