From: Samuel Pitoiset Date: Tue, 10 Jul 2018 14:13:40 +0000 (+0200) Subject: radv/meta: do not restore a NULL descriptor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6bfbc7b38b581e1a634b07bb5f3b3870c0a57317;p=mesa.git radv/meta: do not restore a NULL descriptor Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c index 00a20d155e7..a59f38fb21d 100644 --- a/src/amd/vulkan/radv_meta.c +++ b/src/amd/vulkan/radv_meta.c @@ -80,10 +80,9 @@ radv_meta_save(struct radv_meta_saved_state *state, } if (state->flags & RADV_META_SAVE_DESCRIPTORS) { - if (descriptors_state->valid & (1 << 0)) - state->old_descriptor_set0 = descriptors_state->sets[0]; - else - state->old_descriptor_set0 = NULL; + state->old_descriptor_set0 = descriptors_state->sets[0]; + if (!state->old_descriptor_set0) + state->flags &= ~RADV_META_SAVE_DESCRIPTORS; } if (state->flags & RADV_META_SAVE_CONSTANTS) {