aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/teximage.h')
-rw-r--r--mesalib/src/mesa/main/teximage.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/teximage.h b/mesalib/src/mesa/main/teximage.h
index 12af0e6d6..e2bdaca01 100644
--- a/mesalib/src/mesa/main/teximage.h
+++ b/mesalib/src/mesa/main/teximage.h
@@ -44,7 +44,14 @@ _mesa_is_cube_face(GLenum target)
target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB);
}
-
+/** Is any of the dimensions of given texture equal to zero? */
+static inline GLboolean
+_mesa_is_zero_size_texture(const struct gl_texture_image *texImage)
+{
+ return (texImage->Width == 0 ||
+ texImage->Height == 0 ||
+ texImage->Depth == 0);
+}
/** \name Internal functions */
/*@{*/