anv: Fix the comparison in an assert
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 13 Mar 2020 17:05:25 +0000 (12:05 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 16 Mar 2020 15:14:14 +0000 (15:14 +0000)
Fixes: e03f9652801 "anv: Bounds-check pushed UBOs when ..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4195>

src/intel/vulkan/genX_cmd_buffer.c

index 0e30469400450df4ace64ed6ad9495edcd1a6f03..49a9e8c6913c894e5801829f6c90e465d2102691 100644 (file)
@@ -2940,7 +2940,7 @@ get_push_range_bound_size(struct anv_cmd_buffer *cmd_buffer,
       struct anv_descriptor_set *set =
          gfx_state->base.descriptors[range->index];
       assert(range->start * 32 < set->desc_mem.alloc_size);
-      assert((range->start + range->length) * 32 < set->desc_mem.alloc_size);
+      assert((range->start + range->length) * 32 <= set->desc_mem.alloc_size);
       return set->desc_mem.alloc_size - range->start * 32;
    }