From 6bfbc7b38b581e1a634b07bb5f3b3870c0a57317 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 10 Jul 2018 16:13:40 +0200 Subject: radv/meta: do not restore a NULL descriptor Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_meta.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/amd/vulkan/radv_meta.c') 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) { -- cgit v1.2.3