Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

shaders: fix texture uniforms for NV12 rendering.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
  • Loading branch information...
commit 421a54368e8fa2ddaeefadefa44123b963234789 1 parent e6e434f
@gbeauchesne authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 xbmc/cores/VideoRenderers/VideoShaders/YUV2RGBShader.cpp
View
14 xbmc/cores/VideoRenderers/VideoShaders/YUV2RGBShader.cpp
@@ -261,8 +261,18 @@ bool BaseYUV2RGBGLSLShader::OnEnabled()
{
// set shader attributes once enabled
glUniform1i(m_hYTex, 0);
- glUniform1i(m_hUTex, 1);
- glUniform1i(m_hVTex, 2);
+ switch (m_format)
+ {
+//case RENDER_FMT_NV12:
+ case RENDER_FMT_Y_UV:
+ glUniform1i(m_hUTex, 1);
+ glUniform1i(m_hVTex, 1);
+ break;
+ default:
+ glUniform1i(m_hUTex, 1);
+ glUniform1i(m_hVTex, 2);
+ break;
+ }
glUniform1f(m_hStretch, m_stretch);
glUniform2f(m_hStep, 1.0 / m_width, 1.0 / m_height);
Please sign in to comment.
Something went wrong with that request. Please try again.