summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/vulkan/radv_meta.c')
-rw-r--r--src/amd/vulkan/radv_meta.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c
index 80c5eb28cbe..2bfaeb33930 100644
--- a/src/amd/vulkan/radv_meta.c
+++ b/src/amd/vulkan/radv_meta.c
@@ -73,7 +73,10 @@ radv_meta_save(struct radv_meta_saved_state *state,
}
if (state->flags & RADV_META_SAVE_DESCRIPTORS) {
- state->old_descriptor_set0 = cmd_buffer->state.descriptors[0];
+ if (cmd_buffer->state.valid_descriptors & (1 << 0))
+ state->old_descriptor_set0 = cmd_buffer->descriptors[0];
+ else
+ state->old_descriptor_set0 = NULL;
}
if (state->flags & RADV_META_SAVE_CONSTANTS) {