diff options
author | marha <marha@users.sourceforge.net> | 2012-10-01 12:04:07 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-10-01 12:04:07 +0200 |
commit | 7305d42f2ad0462ca3916a73df49cc6b70b41fe4 (patch) | |
tree | 4de7ec9601f83c61d84e9b8cda40ca0f5ca6bc91 /mesalib/src/mesa/drivers/common/meta.c | |
parent | c86fbbd2c3bb30e96a614456bbb7688e0387cf8c (diff) | |
parent | 7ed9dbafdbc724c1030404f29678559134de559b (diff) | |
download | vcxsrv-7305d42f2ad0462ca3916a73df49cc6b70b41fe4.tar.gz vcxsrv-7305d42f2ad0462ca3916a73df49cc6b70b41fe4.tar.bz2 vcxsrv-7305d42f2ad0462ca3916a73df49cc6b70b41fe4.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libxcb mesa pixman xkeyboard-config git update 1 oct 2012
Conflicts:
libxcb/src/man/.gitignore
Diffstat (limited to 'mesalib/src/mesa/drivers/common/meta.c')
-rw-r--r-- | mesalib/src/mesa/drivers/common/meta.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index 6689337e3..d0bb5e0ae 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -3489,12 +3489,16 @@ get_temp_image_type(struct gl_context *ctx, gl_format format) case GL_LUMINANCE: case GL_LUMINANCE_ALPHA: case GL_INTENSITY: - if (ctx->DrawBuffer->Visual.redBits <= 8) + if (ctx->DrawBuffer->Visual.redBits <= 8) { return GL_UNSIGNED_BYTE; - else if (ctx->DrawBuffer->Visual.redBits <= 16) + } else if (ctx->DrawBuffer->Visual.redBits <= 16) { return GL_UNSIGNED_SHORT; - else - return _mesa_get_format_datatype(format); + } else { + GLenum datatype = _mesa_get_format_datatype(format); + if (datatype == GL_INT || datatype == GL_UNSIGNED_INT) + return datatype; + return GL_FLOAT; + } case GL_DEPTH_COMPONENT: return GL_UNSIGNED_INT; case GL_DEPTH_STENCIL: |