Commit fbf37518 authored by Felix Paul Kühne's avatar Felix Paul Kühne

opengl: don't use RGB shaders for RGB to RGB conversations

This fixes display of RGB* input modules such as screen://
parent 70180182
...@@ -412,8 +412,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt, ...@@ -412,8 +412,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
bool need_fs_yuv = false; bool need_fs_yuv = false;
float yuv_range_correction = 1.0; float yuv_range_correction = 1.0;
if (max_texture_units >= 3 && supports_shaders && if (max_texture_units >= 3 && supports_shaders && vlc_fourcc_IsYUV(fmt->i_chroma)) {
vlc_fourcc_IsYUV(fmt->i_chroma) && !vlc_fourcc_IsYUV(vgl->fmt.i_chroma)) {
const vlc_fourcc_t *list = vlc_fourcc_GetYUVFallback(fmt->i_chroma); const vlc_fourcc_t *list = vlc_fourcc_GetYUVFallback(fmt->i_chroma);
while (*list) { while (*list) {
const vlc_chroma_description_t *dsc = vlc_fourcc_GetChromaDescription(*list); const vlc_chroma_description_t *dsc = vlc_fourcc_GetChromaDescription(*list);
...@@ -466,14 +465,11 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt, ...@@ -466,14 +465,11 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
vgl->shader[1] = vgl->shader[1] =
vgl->shader[2] = -1; vgl->shader[2] = -1;
vgl->local_count = 0; vgl->local_count = 0;
if (supports_shaders) { if (supports_shaders && vlc_fourcc_IsYUV(fmt->i_chroma)) {
if (need_fs_yuv)
BuildYUVFragmentShader(vgl, &vgl->shader[0], BuildYUVFragmentShader(vgl, &vgl->shader[0],
&vgl->local_count, &vgl->local_count,
vgl->local_value, vgl->local_value,
fmt, yuv_range_correction); fmt, yuv_range_correction);
else
BuildRGBFragmentShader(vgl, &vgl->shader[0]);
BuildRGBAFragmentShader(vgl, &vgl->shader[1]); BuildRGBAFragmentShader(vgl, &vgl->shader[1]);
BuildVertexShader(vgl, &vgl->shader[2]); BuildVertexShader(vgl, &vgl->shader[2]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment