mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-20 16:30:50 +02:00
anv: Fix leak when compiling internal kernels
Cc: mesa-stable Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25928>
This commit is contained in:
parent
736577871b
commit
9d73bfc9cd
1 changed files with 5 additions and 0 deletions
|
|
@ -245,6 +245,8 @@ compile_upload_spirv(struct anv_device *device,
|
|||
|
||||
brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data.base.ubo_ranges);
|
||||
|
||||
void *temp_ctx = ralloc_context(NULL);
|
||||
|
||||
const unsigned *program;
|
||||
if (stage == MESA_SHADER_FRAGMENT) {
|
||||
struct brw_compile_stats stats[3];
|
||||
|
|
@ -254,6 +256,7 @@ compile_upload_spirv(struct anv_device *device,
|
|||
.log_data = device,
|
||||
.debug_flag = DEBUG_WM,
|
||||
.stats = stats,
|
||||
.mem_ctx = temp_ctx,
|
||||
},
|
||||
.key = &key.wm,
|
||||
.prog_data = &prog_data.wm,
|
||||
|
|
@ -287,6 +290,7 @@ compile_upload_spirv(struct anv_device *device,
|
|||
.stats = &stats,
|
||||
.log_data = device,
|
||||
.debug_flag = DEBUG_CS,
|
||||
.mem_ctx = temp_ctx,
|
||||
},
|
||||
.key = &key.cs,
|
||||
.prog_data = &prog_data.cs,
|
||||
|
|
@ -314,6 +318,7 @@ compile_upload_spirv(struct anv_device *device,
|
|||
&push_desc_info,
|
||||
0 /* dynamic_push_values */);
|
||||
|
||||
ralloc_free(temp_ctx);
|
||||
ralloc_free(nir);
|
||||
|
||||
return kernel;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue