mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
radv: fix possible use-after-free when inserting GS copy shader from cache
If we give radv_pipeline_cache_insert_shaders() a variant which was retrived from the cache, it will free it. I haven't encountered this issue, but it seems possible. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10433>
This commit is contained in:
parent
d6894b643b
commit
5ec25d54cf
1 changed files with 2 additions and 2 deletions
|
|
@ -3454,9 +3454,9 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_device *device,
|
|||
gfx9_get_gs_info(pipeline_key, pipeline, nir, infos, gs_info);
|
||||
}
|
||||
|
||||
if (modules[MESA_SHADER_GEOMETRY]) {
|
||||
if (modules[MESA_SHADER_GEOMETRY] && !pipeline->gs_copy_shader) {
|
||||
struct radv_shader_binary *gs_copy_binary = NULL;
|
||||
if (!pipeline->gs_copy_shader && !radv_pipeline_has_ngg(pipeline)) {
|
||||
if (!radv_pipeline_has_ngg(pipeline)) {
|
||||
struct radv_shader_info info = {0};
|
||||
struct radv_shader_variant_key key = {0};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue