gl-renderer: Sample XYUV shader variant using .rgb

This is mostly to improve consistency.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
Loïc Molinari 2024-11-22 18:22:06 +01:00 committed by Daniel Stone
parent b947955499
commit 0ca40593dc
2 changed files with 3 additions and 3 deletions

View file

@ -211,7 +211,7 @@ sample_input_texture()
yuva.yz = texture2D_swizzle(tex1, 1, v_texcoord).rg;
} else if (c_variant == SHADER_VARIANT_XYUV) {
yuva.xyz = texture2D_swizzle(tex, 0, v_texcoord).bgr;
yuva.xyz = texture2D_swizzle(tex, 0, v_texcoord).rgb;
} else {
/* Never reached, bad variant value. */

View file

@ -75,7 +75,7 @@
#define SWIZZLES_R000 { GL_RED, GL_ZERO, GL_ZERO, GL_ZERO }
#define SWIZZLES_RB00 { GL_RED, GL_BLUE, GL_ZERO, GL_ZERO }
#define SWIZZLES_RG00 { GL_RED, GL_GREEN, GL_ZERO, GL_ZERO }
#define SWIZZLES_RGB0 { GL_RED, GL_GREEN, GL_BLUE, GL_ZERO }
#define SWIZZLES_BGR0 { GL_BLUE, GL_GREEN, GL_RED, GL_ZERO }
enum gl_debug_mode {
DEBUG_MODE_NONE = 0,
@ -623,7 +623,7 @@ struct yuv_format_descriptor yuv_formats[] = {
{{
.format = DRM_FORMAT_ABGR8888,
.plane_index = 0,
.swizzles.array = SWIZZLES_RGB0,
.swizzles.array = SWIZZLES_BGR0,
}}
}
};