From 06dbe0722f8109d8cc7b1c7edf0dc3d4ce6f0d08 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 28 Sep 2017 13:50:56 +0200 Subject: radv: cleanup radv_device_finish_meta_XXX() helpers Unnecessary to double check that handles are not NULL. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_meta_resolve.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/amd/vulkan/radv_meta_resolve.c') diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c index 80b44c89e97..5141ae3baae 100644 --- a/src/amd/vulkan/radv_meta_resolve.c +++ b/src/amd/vulkan/radv_meta_resolve.c @@ -219,18 +219,11 @@ void radv_device_finish_meta_resolve_state(struct radv_device *device) { struct radv_meta_state *state = &device->meta_state; - VkDevice device_h = radv_device_to_handle(device); - VkRenderPass pass_h = device->meta_state.resolve.pass; - const VkAllocationCallbacks *alloc = &device->meta_state.alloc; - if (pass_h) - radv_DestroyRenderPass(device_h, pass_h, - &device->meta_state.alloc); - - VkPipeline pipeline_h = state->resolve.pipeline; - if (pipeline_h) { - radv_DestroyPipeline(device_h, pipeline_h, alloc); - } + radv_DestroyRenderPass(radv_device_to_handle(device), + state->resolve.pass, &state->alloc); + radv_DestroyPipeline(radv_device_to_handle(device), + state->resolve.pipeline, &state->alloc); } VkResult -- cgit v1.2.3