summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-09-16 19:15:28 -0600
committerBrian Paul <[email protected]>2012-09-17 19:49:27 -0600
commita0fc7620f5e8bdfcda07f920db560e5a17535e31 (patch)
treed062451cb3a7889d03df7a3674dbfe6664848282 /src
parent90ca4c0c620ef5ca71d1a9c2e28ba65965b16d34 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/teximage.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index a0835d2ee0d..83e79a5a31c 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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;
}