i965/miptree: Check tex image allocation failures
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 21 Jul 2017 08:17:57 +0000 (11:17 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 21 Jul 2017 21:14:16 +0000 (00:14 +0300)
commitf8894fab0294817481b30e3cc40f6b3ccfe9314d
tree76e01cfa53baa492f8f62b7264d380fabb81e958
parent4aea4d6d64de81b2c00784aa69ca900fdbec3690
i965/miptree: Check tex image allocation failures

allowing graceful failure instead of crash on assert later on.

This can be hit, for example, on SNB when trying to allocate
8kx8k CUBE_MAP against isl: x-tiled buffer size becomes
2421161984 exceeding the maximum of 1 << 31 == 2147483648.

Another way to hit this on SNB is with multisampling of over
64-bit formats.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_tex.c