radv/meta: avoid potential NULL deref with the gfx depth decompress pipeline

If the pipeline failed to be created.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
This commit is contained in:
Samuel Pitoiset 2024-07-17 20:23:22 +02:00 committed by Marge Bot
parent 9c1fa23adf
commit 7c94ed0394

View file

@ -363,9 +363,11 @@ radv_process_depth_stencil(struct radv_cmd_buffer *cmd_buffer, struct radv_image
VkCommandBuffer cmd_buffer_h = radv_cmd_buffer_to_handle(cmd_buffer);
VkPipeline *pipeline;
radv_meta_save(&saved_state, cmd_buffer, RADV_META_SAVE_GRAPHICS_PIPELINE | RADV_META_SAVE_RENDER);
pipeline = radv_get_depth_pipeline(cmd_buffer, image, subresourceRange);
if (!pipeline)
return;
radv_meta_save(&saved_state, cmd_buffer, RADV_META_SAVE_GRAPHICS_PIPELINE | RADV_META_SAVE_RENDER);
radv_CmdBindPipeline(radv_cmd_buffer_to_handle(cmd_buffer), VK_PIPELINE_BIND_POINT_GRAPHICS, *pipeline);