diff options
author | Jason Ekstrand <[email protected]> | 2018-10-02 17:29:33 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-10-27 00:02:32 -0500 |
commit | 663a113700a94ca9d163f020b3317f6b319c4154 (patch) | |
tree | 3d603eb72749bda54d30a6981145c34dca63ce0e /src/intel/vulkan | |
parent | c41772d17ae155cc74775f58a37004d6b01d329e (diff) |
anv: Improve the asserts in anv_buffer_get_range
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 25e290ed112..d8a08d9d67f 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1705,7 +1705,8 @@ anv_buffer_get_range(struct anv_buffer *buffer, uint64_t offset, uint64_t range) if (range == VK_WHOLE_SIZE) { return buffer->size - offset; } else { - assert(range <= buffer->size); + assert(range + offset >= range); + assert(range + offset <= buffer->size); return range; } } |