[vlc-commits] direct3d11: always call OMSetRenderTargets before rendering
Steve Lhomme
git at videolan.org
Fri Apr 27 15:33:02 CEST 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 26 15:55:17 2018 +0200| [20fda0de298411628141359c62150bb8d122f8c3] | committer: Hugo Beauzée-Luyssen
direct3d11: always call OMSetRenderTargets before rendering
(cherry picked from commit e371100e2343f90560ce888f229caa68c82634fa)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=20fda0de298411628141359c62150bb8d122f8c3
---
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 676fc916a0..b428a147dc 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1105,6 +1105,8 @@ static void DisplayD3DPicture(vout_display_sys_t *sys, d3d_quad_t *quad, ID3D11S
UINT stride = sizeof(d3d_vertex_t);
UINT offset = 0;
+ ID3D11DeviceContext_OMSetRenderTargets(sys->d3d_dev.d3dcontext, 1, &sys->d3drenderTargetView, sys->d3ddepthStencilView);
+
/* Render the quad */
/* vertex shader */
ID3D11DeviceContext_IASetVertexBuffers(sys->d3d_dev.d3dcontext, 0, 1, &quad->pVertexBuffer, &stride, &offset);
@@ -1276,8 +1278,6 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
/* no ID3D11Device operations should come here */
- ID3D11DeviceContext_OMSetRenderTargets(sys->d3d_dev.d3dcontext, 1, &sys->d3drenderTargetView, sys->d3ddepthStencilView);
-
ID3D11DeviceContext_ClearDepthStencilView(sys->d3d_dev.d3dcontext, sys->d3ddepthStencilView, D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.0f, 0);
/* Render the quad */
More information about the vlc-commits
mailing list