summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/common/meta.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 64fcd29eb14..f8f0ee306ff 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -2745,15 +2745,14 @@ get_temp_image_type(struct gl_context *ctx, mesa_format format)
case GL_LUMINANCE:
case GL_LUMINANCE_ALPHA:
case GL_INTENSITY:
- if (format_red_bits <= 8) {
+ if (datatype == GL_INT || datatype == GL_UNSIGNED_INT) {
+ return datatype;
+ } else if (format_red_bits <= 8) {
return GL_UNSIGNED_BYTE;
} else if (format_red_bits <= 16) {
return GL_UNSIGNED_SHORT;
- } else {
- if (datatype == GL_INT || datatype == GL_UNSIGNED_INT)
- return datatype;
- return GL_FLOAT;
}
+ return GL_FLOAT;
case GL_DEPTH_COMPONENT:
if (datatype == GL_FLOAT)
return GL_FLOAT;