Commit 49ea9bbc authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

direct3d11: only change the pixel shader if the first output texture is DXGI_FORMAT_R8_UNORM

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6a23d2cd
...@@ -1095,29 +1095,31 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt) ...@@ -1095,29 +1095,31 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
sys->d3dregion_format = DXGI_FORMAT_UNKNOWN; sys->d3dregion_format = DXGI_FORMAT_UNKNOWN;
} }
switch (fmt->i_chroma) sys->d3dPxShader = globPixelShaderDefault;
if (sys->picQuadConfig.resourceFormatYRGB == DXGI_FORMAT_R8_UNORM)
{ {
case VLC_CODEC_NV12: switch (fmt->i_chroma)
case VLC_CODEC_D3D11_OPAQUE: {
if( fmt->i_height > 576 ) case VLC_CODEC_NV12:
sys->d3dPxShader = globPixelShaderBiplanarYUV_BT709_2RGB; case VLC_CODEC_D3D11_OPAQUE:
else if( fmt->i_height > 576 )
sys->d3dPxShader = globPixelShaderBiplanarYUV_BT601_2RGB; sys->d3dPxShader = globPixelShaderBiplanarYUV_BT709_2RGB;
break; else
case VLC_CODEC_YV12: sys->d3dPxShader = globPixelShaderBiplanarYUV_BT601_2RGB;
case VLC_CODEC_I420: break;
if( fmt->i_height > 576 ) case VLC_CODEC_YV12:
sys->d3dPxShader = globPixelShaderBiplanarI420_BT709_2RGB; case VLC_CODEC_I420:
else if( fmt->i_height > 576 )
sys->d3dPxShader = globPixelShaderBiplanarI420_BT601_2RGB; sys->d3dPxShader = globPixelShaderBiplanarI420_BT709_2RGB;
break; else
case VLC_CODEC_RGB32: sys->d3dPxShader = globPixelShaderBiplanarI420_BT601_2RGB;
case VLC_CODEC_BGRA: break;
case VLC_CODEC_RGB16: default:
default: vlc_assert_unreachable();
sys->d3dPxShader = globPixelShaderDefault; break;
break; }
} }
if (sys->d3dregion_format != DXGI_FORMAT_UNKNOWN) if (sys->d3dregion_format != DXGI_FORMAT_UNKNOWN)
sys->psz_rgbaPxShader = globPixelShaderDefault; sys->psz_rgbaPxShader = globPixelShaderDefault;
else else
......
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