[vlc-commits] direct3d11: don't use D3D11_MAP_WRITE_NO_OVERWRITE as it's not needed
Steve Lhomme
git at videolan.org
Tue May 2 10:03:10 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Fri Apr 28 17:46:16 2017 +0200| [0f699337032d814dd43f8729f97b38d9bfdccbae] | committer: Jean-Baptiste Kempf
direct3d11: don't use D3D11_MAP_WRITE_NO_OVERWRITE as it's not needed
And not always supported.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f699337032d814dd43f8729f97b38d9bfdccbae
---
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;
More information about the vlc-commits
mailing list