radv: Don't leak the RT prolog binary

Fixes: 063d0c90 ("radv: Combine all the parts together with a main loop for an RT pipeline.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22535>
(cherry picked from commit b73e2df47a)
This commit is contained in:
Friedrich Vock 2023-04-17 16:19:11 +02:00 committed by Eric Engestrom
parent 93f4b5667c
commit 75b3939cf7
2 changed files with 4 additions and 6 deletions

View file

@ -625,7 +625,7 @@
"description": "radv: Don't leak the RT prolog binary",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "063d0c90c81b62f03cacfacc05801610da5dbe2f"
},

View file

@ -2382,7 +2382,7 @@ radv_create_rt_prolog(struct radv_device *device)
radv_postprocess_binary_config(device, binary, &in_args);
prolog = radv_shader_create(device, binary);
if (!prolog)
goto fail;
goto done;
if (device->keep_shader_info || options.dump_shader) {
radv_capture_shader_executable_info(device, prolog, NULL, 0, binary);
@ -2393,11 +2393,9 @@ radv_create_rt_prolog(struct radv_device *device)
fprintf(stderr, "\ndisasm:\n%s\n", prolog->disasm_string);
}
return prolog;
fail:
done:
free(binary);
return NULL;
return prolog;
}
struct radv_shader_part *