Skip to content
Snippets Groups Projects
Commit 58e95f99 authored by Dave Airlie's avatar Dave Airlie Committed by Marge Bot
Browse files

crocus/blt: add pitch/offset checks to fix blt corruption

I lost these in my conversion from i965 but they are necessary.

This should fix corruption in qt fonts at seen in the minecraft
launcher.

Fixes: f3630548 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <mesa/mesa!12329>
parent cb2e712b
No related branches found
No related tags found
Loading
......@@ -188,6 +188,13 @@ static bool emit_copy_blt(struct crocus_batch *batch,
}
}
/* Blit pitch must be dword-aligned. Otherwise, the hardware appears to drop
* the low bits. Offsets must be naturally aligned.
*/
if (src_pitch % 4 != 0 || src_offset % cpp != 0 ||
dst_pitch % 4 != 0 || dst_offset % cpp != 0)
return false;
/* For tiled source and destination, pitch value should be specified
* as a number of Dwords.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment