radv: do not restore NULL compute pipelines after meta operations

This should be safe as long as the driver restores descriptors and
push constants correctly for compute pipelines.

This might also reduce the number of compute pipeline changes if eg.
consecutve subpass fast clears with compute.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14616>
This commit is contained in:
Samuel Pitoiset
2022-01-19 11:59:49 +01:00
committed by Marge Bot
parent 8f70143c50
commit 86b8fa9aee

View File

@@ -219,8 +219,10 @@ radv_meta_restore(const struct radv_meta_saved_state *state, struct radv_cmd_buf
}
if (state->flags & RADV_META_SAVE_COMPUTE_PIPELINE) {
radv_CmdBindPipeline(radv_cmd_buffer_to_handle(cmd_buffer), VK_PIPELINE_BIND_POINT_COMPUTE,
radv_pipeline_to_handle(state->old_pipeline));
if (state->old_pipeline) {
radv_CmdBindPipeline(radv_cmd_buffer_to_handle(cmd_buffer), VK_PIPELINE_BIND_POINT_COMPUTE,
radv_pipeline_to_handle(state->old_pipeline));
}
}
if (state->flags & RADV_META_SAVE_DESCRIPTORS) {