mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
radv: Fix fragment resolve init memory allocation failure paths.
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 2c802ca66c)
This commit is contained in:
parent
f1c8bc6e85
commit
1663b7edf0
1 changed files with 6 additions and 8 deletions
|
|
@ -316,16 +316,9 @@ create_resolve_pipeline(struct radv_device *device,
|
||||||
&vk_pipeline_info, &radv_pipeline_info,
|
&vk_pipeline_info, &radv_pipeline_info,
|
||||||
&device->meta_state.alloc,
|
&device->meta_state.alloc,
|
||||||
pipeline);
|
pipeline);
|
||||||
|
|
||||||
ralloc_free(vs.nir);
|
ralloc_free(vs.nir);
|
||||||
ralloc_free(fs.nir);
|
ralloc_free(fs.nir);
|
||||||
if (result != VK_SUCCESS)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
return VK_SUCCESS;
|
|
||||||
fail:
|
|
||||||
ralloc_free(vs.nir);
|
|
||||||
ralloc_free(fs.nir);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -336,14 +329,19 @@ radv_device_init_meta_resolve_fragment_state(struct radv_device *device)
|
||||||
|
|
||||||
res = create_layout(device);
|
res = create_layout(device);
|
||||||
if (res != VK_SUCCESS)
|
if (res != VK_SUCCESS)
|
||||||
return res;
|
goto fail;
|
||||||
|
|
||||||
for (uint32_t i = 0; i < MAX_SAMPLES_LOG2; ++i) {
|
for (uint32_t i = 0; i < MAX_SAMPLES_LOG2; ++i) {
|
||||||
for (unsigned j = 0; j < ARRAY_SIZE(pipeline_formats); ++j) {
|
for (unsigned j = 0; j < ARRAY_SIZE(pipeline_formats); ++j) {
|
||||||
res = create_resolve_pipeline(device, i, pipeline_formats[j]);
|
res = create_resolve_pipeline(device, i, pipeline_formats[j]);
|
||||||
|
if (res != VK_SUCCESS)
|
||||||
|
goto fail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return VK_SUCCESS;
|
||||||
|
fail:
|
||||||
|
radv_device_finish_meta_resolve_fragment_state(device);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue