summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta_decompress.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-09-28 13:50:56 +0200
committerSamuel Pitoiset <[email protected]>2017-10-02 11:56:20 +0200
commit06dbe0722f8109d8cc7b1c7edf0dc3d4ce6f0d08 (patch)
tree87cae3569168a1cf7565dbc43f4ed5d15384f9d4 /src/amd/vulkan/radv_meta_decompress.c
parent2084629b632407ba3a4c769d0deb38cd2aa24772 (diff)
radv: cleanup radv_device_finish_meta_XXX() helpers
Unnecessary to double check that handles are not NULL. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_decompress.c')
-rw-r--r--src/amd/vulkan/radv_meta_decompress.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/amd/vulkan/radv_meta_decompress.c b/src/amd/vulkan/radv_meta_decompress.c
index fe18ddfb91f..c68be27f1f6 100644
--- a/src/amd/vulkan/radv_meta_decompress.c
+++ b/src/amd/vulkan/radv_meta_decompress.c
@@ -207,22 +207,17 @@ void
radv_device_finish_meta_depth_decomp_state(struct radv_device *device)
{
struct radv_meta_state *state = &device->meta_state;
- VkDevice device_h = radv_device_to_handle(device);
- const VkAllocationCallbacks *alloc = &device->meta_state.alloc;
for (uint32_t i = 0; i < ARRAY_SIZE(state->depth_decomp); ++i) {
- VkRenderPass pass_h = state->depth_decomp[i].pass;
- if (pass_h) {
- radv_DestroyRenderPass(device_h, pass_h, alloc);
- }
- VkPipeline pipeline_h = state->depth_decomp[i].decompress_pipeline;
- if (pipeline_h) {
- radv_DestroyPipeline(device_h, pipeline_h, alloc);
- }
- pipeline_h = state->depth_decomp[i].resummarize_pipeline;
- if (pipeline_h) {
- radv_DestroyPipeline(device_h, pipeline_h, alloc);
- }
+ radv_DestroyRenderPass(radv_device_to_handle(device),
+ state->depth_decomp[i].pass,
+ &state->alloc);
+ radv_DestroyPipeline(radv_device_to_handle(device),
+ state->depth_decomp[i].decompress_pipeline,
+ &state->alloc);
+ radv_DestroyPipeline(radv_device_to_handle(device),
+ state->depth_decomp[i].resummarize_pipeline,
+ &state->alloc);
}
}