[Mesa-dev] [PATCH 1/4] anv/so_memcpy: Don't consider src/dst_offset when computing block size

Lionel Landwerlin lionel.g.landwerlin at intel.com
Wed Sep 19 14:18:16 UTC 2018


Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

On 12/09/2018 06:06, Jason Ekstrand wrote:
> The only thing that matters is the size since we never specify any
> offsets in terms of blocks.
> ---
>   src/intel/vulkan/genX_gpu_memcpy.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/intel/vulkan/genX_gpu_memcpy.c b/src/intel/vulkan/genX_gpu_memcpy.c
> index eaafcfa3b22..57abd8cd5c1 100644
> --- a/src/intel/vulkan/genX_gpu_memcpy.c
> +++ b/src/intel/vulkan/genX_gpu_memcpy.c
> @@ -126,10 +126,8 @@ genX(cmd_buffer_so_memcpy)(struct anv_cmd_buffer *cmd_buffer,
>      assert(src_offset + size <= src->size);
>   
>      /* The maximum copy block size is 4 32-bit components at a time. */
> -   unsigned bs = 16;
> -   bs = gcd_pow2_u64(bs, src_offset);
> -   bs = gcd_pow2_u64(bs, dst_offset);
> -   bs = gcd_pow2_u64(bs, size);
> +   assert(size % 4 == 0);
> +   unsigned bs = gcd_pow2_u64(16, size);
>   
>      enum isl_format format;
>      switch (bs) {




More information about the mesa-dev mailing list