summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-11-05 23:37:47 +0000
committerDave Airlie <[email protected]>2017-11-06 01:11:03 +0000
commit60a9705e0040a0962b82ec5363c14503d8a96d42 (patch)
treef5524aecb89aa915d66ee086cb3af536f624ef17 /src/amd/vulkan/radv_meta.c
parent3a0d0982522a995f15553d88cfef1c11de63a16c (diff)
radv: move descriptor sets out of cmd_state.
Instead of storing all the pointers and zeroing them all out, just store a valid bitmask in the state. This also moves the CmdBindPipeline path down the cpu usage path for the multithreading demo as it no longer has to traverse MAX_SETS to find the active descriptor sets. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
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) {