[Mesa-dev] [PATCH 3/5] radv/meta: do not restore a NULL descriptor

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Jul 10 14:13:40 UTC 2018


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_meta.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c
index 00a20d155e..a59f38fb21 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) {
-- 
2.18.0



More information about the mesa-dev mailing list