diff options
author | Anuj Phogat <[email protected]> | 2015-06-11 17:23:34 -0700 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2015-07-24 10:48:58 -0700 |
commit | be405ee334ec758a2609d8780221f4f1a1ed3343 (patch) | |
tree | 796c520f1a44634f78bf546d5f352639e5883ea7 /src/mesa | |
parent | c59c0f8a42652603da7f89e3270897cb685fe76b (diff) |
meta: Use _mesa_need_luminance_to_rgb_conversion() in decompress_texture_image()
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 5c46efc45d3..b7c91bfd65e 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -3159,16 +3159,8 @@ decompress_texture_image(struct gl_context *ctx, * returned as red and two-channel texture values are returned as * red/alpha. */ - if (((baseTexFormat == GL_LUMINANCE || - baseTexFormat == GL_LUMINANCE_ALPHA || - baseTexFormat == GL_INTENSITY) && - (destBaseFormat == GL_RGBA || - destBaseFormat == GL_RGB || - destBaseFormat == GL_RG || - destBaseFormat == GL_GREEN || - destBaseFormat == GL_BLUE || - destBaseFormat == GL_BGRA || - destBaseFormat == GL_BGR)) || + if (_mesa_need_luminance_to_rgb_conversion(baseTexFormat, + destBaseFormat) || /* If we're reading back an RGB(A) texture (using glGetTexImage) as * luminance then we need to return L=tex(R). */ |