aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2017-05-24 15:01:35 -0700
committerGitHub <noreply@github.com>2017-05-24 15:01:35 -0700
commit1a38948ad068870671042bff2d8ac615dca9e5d8 (patch)
tree6afe7d362d80452d19c30d63db7f3bca98fa7004 /system
parent8854e23e834a5482b123043160bd871bd9a37e0e (diff)
parentb030c0dc6f027facbdc0a1fce100b47f8fea6200 (diff)
Merge pull request #12113 from lrusak/drm-kms-vp
allow using VAAPI with OpenGLES
Diffstat (limited to 'system')
-rw-r--r--system/shaders/yuv2rgb_basic_gles.glsl7
1 files changed, 7 insertions, 0 deletions
diff --git a/system/shaders/yuv2rgb_basic_gles.glsl b/system/shaders/yuv2rgb_basic_gles.glsl
index 07bae91e8b..82fa003b53 100644
--- a/system/shaders/yuv2rgb_basic_gles.glsl
+++ b/system/shaders/yuv2rgb_basic_gles.glsl
@@ -32,10 +32,17 @@ uniform mat4 m_yuvmat;
void main()
{
vec4 yuv, rgb;
+#if defined(XBMC_NV12_RRG)
+ yuv.rgba = vec4( texture2D(m_sampY, m_cordY).r
+ , texture2D(m_sampU, m_cordU).r
+ , texture2D(m_sampV, m_cordV).g
+ , 1.0);
+#else
yuv.rgba = vec4( texture2D(m_sampY, m_cordY).r
, texture2D(m_sampU, m_cordU).g
, texture2D(m_sampV, m_cordV).a
, 1.0);
+#endif
rgb = m_yuvmat * yuv;
rgb.a = m_alpha;