Mesa (master): meta: Use _mesa_need_rgb_to_luminance_conversion() in decompress_texture_image()
Anuj Phogat
aphogat at kemper.freedesktop.org
Fri Jul 24 19:12:33 UTC 2015
Module: Mesa
Branch: master
Commit: a9cbb2c722615e11818066cbe33006c5cfc43381
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9cbb2c722615e11818066cbe33006c5cfc43381
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date: Fri Jun 12 14:58:46 2015 -0700
meta: Use _mesa_need_rgb_to_luminance_conversion() in decompress_texture_image()
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 | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index b7c91bf..bde544e 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3164,11 +3164,8 @@ decompress_texture_image(struct gl_context *ctx,
/* If we're reading back an RGB(A) texture (using glGetTexImage) as
* luminance then we need to return L=tex(R).
*/
- ((baseTexFormat == GL_RGBA ||
- baseTexFormat == GL_RGB ||
- baseTexFormat == GL_RG) &&
- (destBaseFormat == GL_LUMINANCE ||
- destBaseFormat == GL_LUMINANCE_ALPHA))) {
+ _mesa_need_rgb_to_luminance_conversion(baseTexFormat,
+ destBaseFormat)) {
/* 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