mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 01:30:08 +01:00
mesa: take cube faces into account in _mesa_test_proxy_teximage()
There will always be six cube faces so take that into consideration when computing the texture size and comparing against the limit.
This commit is contained in:
parent
90ca4c0c62
commit
a0fc7620f5
1 changed files with 1 additions and 0 deletions
|
|
@ -1372,6 +1372,7 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
|||
*/
|
||||
uint64_t bytes = _mesa_format_image_size64(format, width, height, depth);
|
||||
uint64_t mbytes = bytes / (1024 * 1024); /* convert to MB */
|
||||
mbytes *= _mesa_num_tex_faces(target);
|
||||
return mbytes <= (uint64_t) ctx->Const.MaxTextureMbytes;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue