vlc | branch: master | Steve Lhomme <[email protected]> | Wed Jan 27 14:28:35 2021 +0100| [c489d6a97afbd43b74b241de5c436e77e95c58a3] | committer: Steve Lhomme
d3d_shaders: add debugging shader compilers in debug mode > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c489d6a97afbd43b74b241de5c436e77e95c58a3 --- modules/video_output/win32/d3d_shaders.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/video_output/win32/d3d_shaders.c b/modules/video_output/win32/d3d_shaders.c index 09d018c82e..2a1eb22b3f 100644 --- a/modules/video_output/win32/d3d_shaders.c +++ b/modules/video_output/win32/d3d_shaders.c @@ -268,14 +268,19 @@ static ID3DBlob* CompileShader(vlc_object_t *obj, const d3d_shader_compiler_t *c target = "vs_4_0_level_9_1"; } + UINT compileFlags = 0; #if VLC_WINSTORE_APP VLC_UNUSED(compiler); #else # define D3DCompile(args...) compiler->OurD3DCompile(args) +# if !defined(NDEBUG) + if (IsDebuggerPresent()) + compileFlags += D3DCOMPILE_DEBUG; +# endif #endif HRESULT hr = D3DCompile(psz_shader, strlen(psz_shader), NULL, NULL, NULL, "main", target, - 0, 0, &pShaderBlob, &pErrBlob); + compileFlags, 0, &pShaderBlob, &pErrBlob); if (FAILED(hr)) { char *err = pErrBlob ? ID3D10Blob_GetBufferPointer(pErrBlob) : NULL; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
