aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/formats.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 3e786934771..f604e235138 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -1008,13 +1008,16 @@ _mesa_is_format_packed_depth_stencil(gl_format format)
/**
- * Is the given format a signed/unsigned integer format?
+ * Is the given format a signed/unsigned integer color format?
*/
GLboolean
_mesa_is_format_integer(gl_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
- return info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT;
+ return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT) &&
+ info->BaseFormat != GL_DEPTH_COMPONENT &&
+ info->BaseFormat != GL_DEPTH_STENCIL &&
+ info->BaseFormat != GL_STENCIL_INDEX;
}