[vlc-commits] direct3d11: always call OMSetRenderTargets before rendering

Steve Lhomme git at videolan.org
Thu Apr 26 16:07:31 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 26 15:55:17 2018 +0200| [e371100e2343f90560ce888f229caa68c82634fa] | committer: Steve Lhomme

direct3d11: always call OMSetRenderTargets before rendering

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e371100e2343f90560ce888f229caa68c82634fa
---

 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 99e8baae51..d089ede339 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1107,6 +1107,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);
@@ -1278,8 +1280,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