radv: add an assertion when pushing meta descriptor sets
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 7 Sep 2017 13:30:38 +0000 (15:30 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 8 Sep 2017 07:42:23 +0000 (09:42 +0200)
Just to make sure we are using the set 0, because it's the
only one which is saved/restored when doing meta operations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index 90b97c8a3770bbc08fd0ce37769c05234db12f9e..4de24c96e656c8547b9d89137ca13994e21133fa 100644 (file)
@@ -2169,6 +2169,7 @@ void radv_meta_push_descriptor_set(
        struct radv_descriptor_set *push_set = &cmd_buffer->meta_push_descriptors;
        unsigned bo_offset;
 
+       assert(set == 0);
        assert(layout->set[set].layout->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR);
 
        push_set->size = layout->set[set].layout->size;