diff options
author | Dave Airlie <[email protected]> | 2017-06-13 09:36:15 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-06-13 10:01:36 +1000 |
commit | 9cce302951cda4604b1ed953bf9d16f60210e5e1 (patch) | |
tree | 7a8d9821e443f632d78faba89074a198840ee837 /src/amd/vulkan | |
parent | b9e76b0c4473b8f3ec2ac8208e1cd86852b5fb52 (diff) |
radv: move assert down in radv_bind_descriptor_set
coverity complains about the deref before NULL check.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index b08f218549a..9f36d982234 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2015,13 +2015,13 @@ void radv_bind_descriptor_set(struct radv_cmd_buffer *cmd_buffer, { struct radeon_winsys *ws = cmd_buffer->device->ws; - assert(!(set->layout->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR)); - cmd_buffer->state.descriptors[idx] = set; cmd_buffer->state.descriptors_dirty |= (1u << idx); if (!set) return; + assert(!(set->layout->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR)); + for (unsigned j = 0; j < set->layout->buffer_count; ++j) if (set->descriptors[j]) ws->cs_add_buffer(cmd_buffer->cs, set->descriptors[j], 7); |