[vlc-commits] direct3d11: only create a local pool for hardware acceleration chromas
Steve Lhomme
git at videolan.org
Mon Feb 25 14:34:14 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 25 13:23:00 2019 +0100| [0383a515f635dfb7828ef1ac08db2f21d9399261] | committer: Steve Lhomme
direct3d11: only create a local pool for hardware acceleration chromas
Otherwise use the CPU pool and copy to the GPU in PreparePicture()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0383a515f635dfb7828ef1ac08db2f21d9399261
---
modules/video_output/win32/direct3d11.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 06c00b3764..85fb06302b 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -566,7 +566,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
else
vd->info.subpicture_chromas = NULL;
- if (sys->picQuad.textureFormat->formatTexture != DXGI_FORMAT_UNKNOWN)
+ if (is_d3d11_opaque(vd->fmt.i_chroma))
vd->pool = Pool;
vd->prepare = Prepare;
vd->display = Display;
@@ -885,7 +885,7 @@ static void PreparePicture(vout_display_t *vd, picture_t *picture, subpicture_t
{
vout_display_sys_t *sys = vd->sys;
- if (sys->picQuad.textureFormat->formatTexture == DXGI_FORMAT_UNKNOWN)
+ if (sys->picQuad.textureFormat->formatTexture == DXGI_FORMAT_UNKNOWN || !is_d3d11_opaque(picture->format.i_chroma))
{
D3D11_MAPPED_SUBRESOURCE mappedResource;
D3D11_TEXTURE2D_DESC texDesc;
More information about the vlc-commits
mailing list