summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2018-09-10 16:36:10 -0500
committerJason Ekstrand <jason.ekstrand@intel.com>2018-09-19 09:38:04 -0500
commitc811af767e61a3df7bd844b49812d85a9b910aa3 (patch)
tree9a3da8216e52df384b0a4c3740ba6020e3d407ce
parent09171705d589ef4f68ccd8e661b78bf53bc3999d (diff)
anv/so_memcpy: Don't consider src/dst_offset when computing block size
The only thing that matters is the size since we never specify any offsets in terms of blocks. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-rw-r--r--src/intel/vulkan/genX_gpu_memcpy.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/vulkan/genX_gpu_memcpy.c b/src/intel/vulkan/genX_gpu_memcpy.c
index 11ffd6fb436..fd78f4d125b 100644
--- a/src/intel/vulkan/genX_gpu_memcpy.c
+++ b/src/intel/vulkan/genX_gpu_memcpy.c
@@ -137,10 +137,8 @@ genX(cmd_buffer_so_memcpy)(struct anv_cmd_buffer *cmd_buffer,
assert(src.offset + size <= src.bo->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) {