meta: Use _mesa_need_luminance_to_rgb_conversion() in decompress_texture_image()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
@@ -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).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user