radv/winsys: remove useless check when binding virtual buffers/images
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 21 Jul 2020 13:51:13 +0000 (15:51 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 22 Jul 2020 15:06:20 +0000 (15:06 +0000)
Size must be greater than 0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5872>

src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c

index a1fbdf960f6844e827fcdc42d1f7db3e5cbc455a..52b94f2e27ad69d643421904309e8e504804cb5d 100644 (file)
@@ -169,9 +169,6 @@ radv_amdgpu_winsys_bo_virtual_bind(struct radeon_winsys_bo *_parent,
        assert(parent->is_virtual);
        assert(!bo || !bo->is_virtual);
 
-       if (!size)
-               return;
-
        /* We have at most 2 new ranges (1 by the bind, and another one by splitting a range that contains the newly bound range). */
        if (parent->range_capacity - parent->range_count < 2) {
                uint32_t range_capacity = parent->range_capacity + 2;