summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 10232d65658..d74a45fb815 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1271,8 +1271,6 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target,
{
uint64_t bytes, mbytes;
- assert(numSamples > 0);
-
if (numLevels > 0) {
/* Compute total memory for a whole mipmap. This is the path
* taken for glTexStorage(GL_PROXY_TEXTURE_x).
@@ -1306,7 +1304,7 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target,
}
bytes *= _mesa_num_tex_faces(target);
- bytes *= numSamples;
+ bytes *= MAX2(1, numSamples);
mbytes = bytes / (1024 * 1024); /* convert to MB */