Revert "Ensure height of 4 to prevent overfetch in vkCmdCopyBuffer"
This reverts commit 6fe54cca81bf7febdf2f820253b3e6ceab3bff2a.
Change-Id: Icca061c2d69dcfe4af777903461e50425016505e
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index ef81540..589becf 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -629,8 +629,6 @@
/* First, we make a bunch of max-sized copies */
uint64_t max_copy_size = MAX_SURFACE_DIM * MAX_SURFACE_DIM * bs;
- /* Ensure height is a multiple of 4 */
- assert(MAX_SURFACE_DIM % 4 == 0);
while (copy_size >= max_copy_size) {
do_buffer_copy(&batch, src_buffer->bo, src_offset,
dst_buffer->bo, dst_offset,
@@ -642,8 +640,6 @@
/* Now make a max-width copy */
uint64_t height = copy_size / (MAX_SURFACE_DIM * bs);
- /* Ensure height is a multiple of 4 */
- height = height & ~0x3;
assert(height < MAX_SURFACE_DIM);
if (height != 0) {
uint64_t rect_copy_size = height * MAX_SURFACE_DIM * bs;
@@ -657,13 +653,9 @@
/* Finally, make a small copy to finish it off */
if (copy_size != 0) {
- assert(copy_size % 4 == 0);
- uint64_t width = copy_size / 4;
- assert(width <= MAX_SURFACE_DIM);
- bs = gcd_pow2_u64(bs, width);
do_buffer_copy(&batch, src_buffer->bo, src_offset,
dst_buffer->bo, dst_offset,
- width / bs, 4, bs);
+ copy_size / bs, 1, bs);
}
}