intel: Add safety asserts for the blit engine's pitch alignment requirements.

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Eric Anholt 2011-10-31 16:59:05 -07:00
parent ac6a376f52
commit a1488eec38

View file

@ -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.
*/