diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-12-23 12:37:13 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-12-29 12:21:35 +0100 |
commit | 8abaa3aeaa0c146676ccef50075e550ceea6271a (patch) | |
tree | e4225ffefb641221324396b9eaeb60b8a2de9cc3 /src | |
parent | e5feeec1404d5223cfed6921de2d5936dbfae95d (diff) |
radv: Use the meta fast clear destructor on construction failure.
Simplifies failure paths. The caller already calls
radv_device_finish_meta_fast_clear_flush_state on failure.
Reviewed-by: Dave Airlie <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_meta_fast_clear.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c index 44c2ff52617..2603229a1f7 100644 --- a/src/amd/vulkan/radv_meta_fast_clear.c +++ b/src/amd/vulkan/radv_meta_fast_clear.c @@ -248,7 +248,7 @@ create_pipeline(struct radv_device *device, &device->meta_state.alloc, &device->meta_state.fast_clear_flush.fmask_decompress_pipeline); if (result != VK_SUCCESS) - goto cleanup_cmask; + goto cleanup; result = radv_graphics_pipeline_create(device_h, radv_pipeline_cache_to_handle(&device->meta_state.cache), @@ -294,13 +294,10 @@ create_pipeline(struct radv_device *device, &device->meta_state.alloc, &device->meta_state.fast_clear_flush.dcc_decompress_pipeline); if (result != VK_SUCCESS) - goto cleanup_fmask; + goto cleanup; goto cleanup; -cleanup_fmask: - radv_DestroyPipeline(device_h, device->meta_state.fast_clear_flush.fmask_decompress_pipeline, &device->meta_state.alloc); -cleanup_cmask: - radv_DestroyPipeline(device_h, device->meta_state.fast_clear_flush.cmask_eliminate_pipeline, &device->meta_state.alloc); + cleanup: ralloc_free(fs_module.nir); return result; |