[vlc-commits] direct3d11: store the texture format that is used to display the texture
Steve Lhomme
git at videolan.org
Wed Feb 8 14:46:01 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Wed Feb 8 14:26:56 2017 +0100| [8c1e5e7b4a5da39a7cf4a36c39a935c6aa7af1fe] | committer: Jean-Baptiste Kempf
direct3d11: store the texture format that is used to display the texture
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c1e5e7b4a5da39a7cf4a36c39a935c6aa7af1fe
---
modules/video_chroma/d3d11_fmt.h | 1 +
modules/video_output/win32/direct3d11.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 354a4bc..7db8bc3 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -39,6 +39,7 @@ struct picture_sys_t
unsigned slice_index;
ID3D11VideoProcessorInputView *inputView; /* when used as processor input */
ID3D11ShaderResourceView *resourceView[D3D11_MAX_SHADER_VIEW];
+ DXGI_FORMAT formatTexture;
};
#endif /* include-guard */
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index dcfcf38..35a6712 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -697,6 +697,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
ID3D11Texture2D_AddRef(texture);
picsys->texture = texture;
picsys->slice_index = picture_count;
+ picsys->formatTexture = vd->sys->picQuadConfig->formatTexture;
picsys->context = vd->sys->d3dcontext;
picture_resource_t resource = {
@@ -2074,6 +2075,8 @@ static int AllocQuad(vout_display_t *vd, const video_format_t *fmt, d3d_quad_t *
if (AllocateShaderView(vd, cfg, quad->pTexture, 0, quad->picSys.resourceView) != VLC_SUCCESS)
goto error;
+ quad->picSys.formatTexture = cfg->formatTexture;
+
if ( d3dpixelShader != NULL )
{
if (!AllocQuadVertices(vd, quad, fmt, projection))
More information about the vlc-commits
mailing list