Dungeon Defenders hits TexImage()'s try_pbo_upload() path where
image->Width == 2, which doesn't meet intelEmitCopyBlit's requirement
that the pitch needs to be a multiple of 4.
Since intelEmitCopyBlit can already fail for a myriad of other reasons,
and it's not clear that other callers are immune to this failure mode,
simply make it return false rather than assert.
Fixes Dungeon Defenders on i965/Ivybridge. Now playable (aside from
having to work around the EXT_bindable_uniform issue).
NOTE: This is probably a candidate for the 9.0 branch.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
/* 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);
+ if (src_pitch % 4 != 0 || dst_pitch % 4 != 0)
+ return false;
/* For big formats (such as floating point), do the copy using 32bpp and
* multiply the coordinates.