[vlc-commits] direct3d11: move the ID3D11PixelShader corresponding to the Quad in the Quad
Steve Lhomme
git at videolan.org
Wed Oct 17 16:07:26 CEST 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Oct 17 15:50:58 2018 +0200| [80430e9143ce2c46a8e7baae874d481e2e5bb355] | committer: Steve Lhomme
direct3d11: move the ID3D11PixelShader corresponding to the Quad in the Quad
(cherry picked from commit e389b237114eea2f267d8e6717aeff390e66eb96)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=80430e9143ce2c46a8e7baae874d481e2e5bb355
---
modules/video_output/win32/direct3d11.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index b8153abf00..152f90c168 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -99,7 +99,6 @@ struct vout_display_sys_t
IDXGISwapChain4 *dxgiswapChain4; /* DXGI 1.5 for HDR */
d3d11_device_t d3d_dev;
d3d_quad_t picQuad;
- ID3D11PixelShader *picQuadPixelShader;
picture_sys_t stagingSys;
@@ -358,7 +357,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
surface_fmt.i_height = sys->picQuad.i_height;
if (D3D11_SetupQuad( vd, &sys->d3d_dev, &surface_fmt, &sys->picQuad, &sys->display, &sys->sys.rect_src_clipped,
- sys->picQuad.formatInfo, sys->picQuadPixelShader,
+ sys->picQuad.formatInfo, sys->picQuad.d3dpixelShader,
vd->fmt.projection_mode == PROJECTION_MODE_RECTANGULAR ? sys->flatVSShader : sys->projectionVSShader,
surface_fmt.projection_mode, vd->fmt.orientation ) != VLC_SUCCESS) {
msg_Err(vd, "Could not Create the main quad picture.");
@@ -1452,7 +1451,7 @@ static int Direct3D11CreateFormatResources(vout_display_t *vd, const video_forma
sys->legacy_shader = sys->d3d_dev.feature_level < D3D_FEATURE_LEVEL_10_0 || !CanUseTextureArray(vd);
hr = D3D11_CompilePixelShader(vd, &sys->hd3d, sys->legacy_shader, &sys->d3d_dev,
- sys->picQuad.formatInfo, &sys->display, fmt->transfer, fmt->b_color_range_full, &sys->picQuadPixelShader);
+ sys->picQuad.formatInfo, &sys->display, fmt->transfer, fmt->b_color_range_full, &sys->picQuad.d3dpixelShader);
if (FAILED(hr))
{
msg_Err(vd, "Failed to create the pixel shader. (hr=0x%lX)", hr);
@@ -1572,10 +1571,10 @@ static int Direct3D11CreateGenericResources(vout_display_t *vd)
sys->d3dregion_format, &sys->display, TRANSFER_FUNC_SRGB, true, &sys->pSPUPixelShader);
if (FAILED(hr))
{
- if (sys->picQuadPixelShader)
+ if (sys->picQuad.d3dpixelShader)
{
- ID3D11PixelShader_Release(sys->picQuadPixelShader);
- sys->picQuadPixelShader = NULL;
+ ID3D11PixelShader_Release(sys->picQuad.d3dpixelShader);
+ sys->picQuad.d3dpixelShader = NULL;
}
msg_Err(vd, "Failed to create the SPU pixel shader. (hr=0x%lX)", hr);
return VLC_EGENERIC;
@@ -1710,10 +1709,10 @@ static void Direct3D11DestroyResources(vout_display_t *vd)
ID3D11PixelShader_Release(sys->pSPUPixelShader);
sys->pSPUPixelShader = NULL;
}
- if (sys->picQuadPixelShader)
+ if (sys->picQuad.d3dpixelShader)
{
- ID3D11PixelShader_Release(sys->picQuadPixelShader);
- sys->picQuadPixelShader = NULL;
+ ID3D11PixelShader_Release(sys->picQuad.d3dpixelShader);
+ sys->picQuad.d3dpixelShader = NULL;
}
msg_Dbg(vd, "Direct3D11 resources destroyed");
More information about the vlc-commits
mailing list