[vlc-devel] [PATCH 02/12] direct3d11: don't use D3D11_MAP_WRITE_NO_OVERWRITE as it's not needed

Steve Lhomme robux4 at gmail.com
Fri Apr 28 17:46:16 CEST 2017


From: Steve Lhomme <robux4 at videolabs.io>

And not always supported.
---
 modules/video_output/win32/direct3d11.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 886fdf1d3a..f58cbb3854 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -230,7 +230,6 @@ static int SetupQuad(vout_display_t *, const video_format_t *, d3d_quad_t *,
                      const d3d_format_t *, ID3D11PixelShader *, video_projection_mode_t);
 static void ReleaseQuad(d3d_quad_t *);
 static void UpdatePicQuadPosition(vout_display_t *);
-static void UpdateQuadOpacity(vout_display_t *, const d3d_quad_t *, float);
 
 static int Control(vout_display_t *vd, int query, va_list args);
 static void Manage(vout_display_t *vd);
@@ -2733,7 +2732,7 @@ static void UpdateQuadOpacity(vout_display_t *vd, const d3d_quad_t *quad, float
     vout_display_sys_t *sys = vd->sys;
     D3D11_MAPPED_SUBRESOURCE mappedResource;
 
-    HRESULT hr = ID3D11DeviceContext_Map(sys->d3dcontext, (ID3D11Resource *)quad->pPixelShaderConstants[0], 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &mappedResource);
+    HRESULT hr = ID3D11DeviceContext_Map(sys->d3dcontext, (ID3D11Resource *)quad->pPixelShaderConstants[0], 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
     if (SUCCEEDED(hr)) {
         FLOAT *dst_data = mappedResource.pData;
         *dst_data = opacity;
-- 
2.12.1



More information about the vlc-devel mailing list