summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2019-07-17 02:58:59 +0200
committerJuan A. Suarez Romero <jasuarez@igalia.com>2019-07-18 08:32:06 +0000
commit1527d02acb315ebf6359b813c7d6f644a2ce501c (patch)
tree73d9ab07a54388a152d78457c69176a2ed3d2a45
parentd578b42e349dd949ac4579cdaad7f12faaf9f516 (diff)
radv: Only save the descriptor set if we have one.
After reset, if valid does not contain the relevant bit the descriptor can be != NULL but still not be valid. CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit f1a89673448227dc22651b0b2d9fc05cbf5d928e)
-rw-r--r--src/amd/vulkan/radv_meta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c
index ec4fc4a6d4b..0606d49392f 100644
--- a/src/amd/vulkan/radv_meta.c
+++ b/src/amd/vulkan/radv_meta.c
@@ -81,7 +81,7 @@ radv_meta_save(struct radv_meta_saved_state *state,
if (state->flags & RADV_META_SAVE_DESCRIPTORS) {
state->old_descriptor_set0 = descriptors_state->sets[0];
- if (!state->old_descriptor_set0)
+ if (!(descriptors_state->valid & 1) || !state->old_descriptor_set0)
state->flags &= ~RADV_META_SAVE_DESCRIPTORS;
}