[vlc-commits] d3d_dynamic_shader: don't log an error when there is none

Steve Lhomme git at videolan.org
Fri Apr 2 13:55:56 UTC 2021


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Mar 31 08:17:02 2021 +0200| [bd399da4350745f59f70ff7621cf5f4eb343bb3e] | committer: Steve Lhomme

d3d_dynamic_shader: don't log an error when there is none

There can be warnings in the pErrBlob.

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

 modules/video_output/win32/d3d_dynamic_shader.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/win32/d3d_dynamic_shader.c b/modules/video_output/win32/d3d_dynamic_shader.c
index e4f73518ed..f08ff79ded 100644
--- a/modules/video_output/win32/d3d_dynamic_shader.c
+++ b/modules/video_output/win32/d3d_dynamic_shader.c
@@ -361,7 +361,10 @@ static HRESULT CompileShader(vlc_object_t *obj, const d3d_shader_compiler_t *com
 
     if (FAILED(hr) || pErrBlob) {
         const char *err = pErrBlob ? ID3D10Blob_GetBufferPointer(pErrBlob) : NULL;
-        msg_Err(obj, "invalid %s Shader (hr=0x%lX): %s", pixelShader?"Pixel":"Vertex", hr, err );
+        if (SUCCEEDED(hr))
+            msg_Dbg(obj, "%s Shader: %s", pixelShader?"Pixel":"Vertex", err );
+        else
+            msg_Err(obj, "invalid %s Shader (hr=0x%lX): %s", pixelShader?"Pixel":"Vertex", hr, err );
         if (pErrBlob)
             ID3D10Blob_Release(pErrBlob);
         if (FAILED(hr))



More information about the vlc-commits mailing list