summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-07-20 18:48:07 +0200
committerSamuel Pitoiset <[email protected]>2018-07-23 11:34:39 +0200
commit6e32d9e7b0945268b844ab2397ab3c9924136d3a (patch)
treea12dacff4045981b3c6397159e4ec97473443231 /src/amd/vulkan
parentd0ee0a0a5d5fb658c87fed82cbcf9b48437abb2c (diff)
radv: fix a memleak for merged shaders on GFX9
modules[i] can be NULL for merged shaders but we have to free the NIR code. radv_can_dump_shader_stats() already handles if modules[i] is NULL, no need to check it twice. Cc: [email protected] Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_pipeline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 27e13a2251c..545b618b7c2 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2160,7 +2160,7 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
for (int i = 0; i < MESA_SHADER_STAGES; ++i) {
free(codes[i]);
- if (modules[i]) {
+ if (nir[i]) {
if (!pipeline->device->keep_shader_info)
ralloc_free(nir[i]);