[Mesa-dev] [RFC PATCH 11/14] anv: Remove some asserts.

Jason Ekstrand jason at jlekstrand.net
Mon Dec 10 19:55:03 UTC 2018


On Fri, Dec 7, 2018 at 6:06 PM Rafael Antognolli <
rafael.antognolli at intel.com> wrote:

> They won't be true anymore once we add support for multiple BOs with
> non-userptr.
>

Why not?  I guess in the highly restricted case of state streams, you can
safely copy out-of-range of one BO because you know exactly what the next
BO is.  Sounds dangerous but totally legit.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>


> ---
>  src/intel/vulkan/genX_gpu_memcpy.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/src/intel/vulkan/genX_gpu_memcpy.c
> b/src/intel/vulkan/genX_gpu_memcpy.c
> index 1bee1c6dc17..e20179fa675 100644
> --- a/src/intel/vulkan/genX_gpu_memcpy.c
> +++ b/src/intel/vulkan/genX_gpu_memcpy.c
> @@ -133,9 +133,6 @@ genX(cmd_buffer_so_memcpy)(struct anv_cmd_buffer
> *cmd_buffer,
>     if (size == 0)
>        return;
>
> -   assert(dst.offset + size <= dst.bo->size);
> -   assert(src.offset + size <= src.bo->size);
> -
>     /* The maximum copy block size is 4 32-bit components at a time. */
>     assert(size % 4 == 0);
>     unsigned bs = gcd_pow2_u64(16, size);
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181210/ab9d3137/attachment.html>


More information about the mesa-dev mailing list