diff options
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_blit.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_blit.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_blit.c b/src/mesa/drivers/dri/i915/intel_blit.c index d4e269dc841..9a68625318a 100644 --- a/src/mesa/drivers/dri/i915/intel_blit.c +++ b/src/mesa/drivers/dri/i915/intel_blit.c @@ -271,9 +271,10 @@ intelEmitCopyBlit(struct intel_context *intel, dst_buffer, dst_pitch, dst_offset, dst_x, dst_y, w, h); /* Blit pitch must be dword-aligned. Otherwise, the hardware appears to drop - * the low bits. + * the low bits. Offsets must be naturally aligned. */ - if (src_pitch % 4 != 0 || dst_pitch % 4 != 0) + if (src_pitch % 4 != 0 || src_offset % cpp != 0 || + dst_pitch % 4 != 0 || dst_offset % cpp != 0) return false; /* For big formats (such as floating point), do the copy using 16 or 32bpp diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c index 73ab488f00d..25ca194df6d 100644 --- a/src/mesa/drivers/dri/i965/intel_blit.c +++ b/src/mesa/drivers/dri/i965/intel_blit.c @@ -342,9 +342,10 @@ intelEmitCopyBlit(struct brw_context *brw, dst_buffer, dst_pitch, dst_offset, dst_x, dst_y, w, h); /* Blit pitch must be dword-aligned. Otherwise, the hardware appears to drop - * the low bits. + * the low bits. Offsets must be naturally aligned. */ - if (src_pitch % 4 != 0 || dst_pitch % 4 != 0) + if (src_pitch % 4 != 0 || src_offset % cpp != 0 || + dst_pitch % 4 != 0 || dst_offset % cpp != 0) return false; /* For big formats (such as floating point), do the copy using 16 or 32bpp |