Mesa (master): meta: Use _mesa_unpack_format_to_base_format() to handle integer formats
Anuj Phogat
aphogat at kemper.freedesktop.org
Fri Jul 24 19:12:33 UTC 2015
Module: Mesa
Branch: master
Commit: 9fff00d387cacf7820c344324820cab764541762
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9fff00d387cacf7820c344324820cab764541762
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date: Fri Jun 12 12:11:01 2015 -0700
meta: Use _mesa_unpack_format_to_base_format() to handle integer formats
Replace a call to mesa_base_tex_format() that handles only internal
formats with a call to the new _mesa_unpack_format_to_base_format()
function that handles allowed unpack formats and does not care for
internal formats at all.
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
---
src/mesa/drivers/common/meta.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 826f223..5c46efc 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3150,7 +3150,7 @@ decompress_texture_image(struct gl_context *ctx,
/* read pixels from renderbuffer */
{
GLenum baseTexFormat = texImage->_BaseFormat;
- GLenum destBaseFormat = _mesa_base_tex_format(ctx, destFormat);
+ GLenum destBaseFormat = _mesa_unpack_format_to_base_format(destFormat);
/* The pixel transfer state will be set to default values at this point
* (see MESA_META_PIXEL_TRANSFER) so pixel transfer ops are effectively
@@ -3176,9 +3176,7 @@ decompress_texture_image(struct gl_context *ctx,
baseTexFormat == GL_RGB ||
baseTexFormat == GL_RG) &&
(destBaseFormat == GL_LUMINANCE ||
- destBaseFormat == GL_LUMINANCE_ALPHA ||
- destBaseFormat == GL_LUMINANCE_INTEGER_EXT ||
- destBaseFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT))) {
+ destBaseFormat == GL_LUMINANCE_ALPHA))) {
/* Green and blue must be zero */
_mesa_PixelTransferf(GL_GREEN_SCALE, 0.0f);
_mesa_PixelTransferf(GL_BLUE_SCALE, 0.0f);
More information about the mesa-commit
mailing list