/* Blits are in a different ringbuffer so we don't use them. */
assert(intel->gen < 6);
- /* The pitch hits the GPU as a is a signed value, IN DWORDs.
- * But we want width to match pitch. Max width is (1 << 15 - 1),
+ /* The pitch given to the GPU must be DWORD aligned, and
+ * we want width to match pitch. Max width is (1 << 15 - 1),
* rounding that down to the nearest DWORD is 1 << 15 - 4
*/
pitch = MIN2(size, (1 << 15) - 4);
dst_offset += pitch * height;
size -= pitch * height;
assert (size < (1 << 15));
+ assert ((size & 3) == 0); /* Pitch must be DWORD aligned */
if (size != 0) {
ok = intelEmitCopyBlit(intel, 1,
size, src_bo, src_offset, I915_TILING_NONE,