mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
i965: Force zero swizzles for unused components in GL_RED and GL_RG
This makes it possible to use a hardware luminance format as RED format. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
ebcde34545
commit
c5363869d4
1 changed files with 4 additions and 0 deletions
|
|
@ -420,7 +420,11 @@ brw_get_texture_swizzle(const struct gl_context *ctx,
|
|||
}
|
||||
break;
|
||||
case GL_RED:
|
||||
swizzles[1] = SWIZZLE_ZERO;
|
||||
/* fallthrough */
|
||||
case GL_RG:
|
||||
swizzles[2] = SWIZZLE_ZERO;
|
||||
/* fallthrough */
|
||||
case GL_RGB:
|
||||
if (_mesa_get_format_bits(img->TexFormat, GL_ALPHA_BITS) > 0 ||
|
||||
img->TexFormat == MESA_FORMAT_RGB_DXT1 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue