mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
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>
This commit is contained in:
parent
4aea4d6d64
commit
f8894fab02
1 changed files with 2 additions and 0 deletions
|
|
@ -95,6 +95,8 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
|
|||
intel_image->mt = intel_miptree_create_for_teximage(brw, intel_texobj,
|
||||
intel_image,
|
||||
1 /* samples */);
|
||||
if (!intel_image->mt)
|
||||
return false;
|
||||
|
||||
/* Even if the object currently has a mipmap tree associated
|
||||
* with it, this one is a more likely candidate to represent the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue