summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-10-31 16:59:05 -0700
committerEric Anholt <[email protected]>2011-11-03 23:29:53 -0700
commita1488eec38d5a76f4e04245a6ce8302444800805 (patch)
treecfd5da99a2f691b6428d08246256cd170ca0a4f9 /src
parentac6a376f528e4867b8422e42fd36c10e4fa79cfb (diff)
intel: Add safety asserts for the blit engine's pitch alignment requirements.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index def226c16b7..8d7693d7b88 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -146,6 +146,12 @@ intelEmitCopyBlit(struct intel_context *intel,
src_pitch *= cpp;
dst_pitch *= cpp;
+ /* Blit pitch must be dword-aligned. Otherwise, the hardware appears to drop
+ * the low bits.
+ */
+ assert(src_pitch % 4 == 0);
+ assert(dst_pitch % 4 == 0);
+
/* For big formats (such as floating point), do the copy using 32bpp and
* multiply the coordinates.
*/