From 0a63fc06246a3868e11741cd3682accc069ba868 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Tue, 27 Mar 2018 19:39:35 -0700 Subject: Added shader name output when shader compilation fails --- Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineD3DBase') diff --git a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp index 5820245b..0e70d7fa 100644 --- a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp +++ b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp @@ -209,11 +209,11 @@ ShaderD3DBase::ShaderD3DBase(const ShaderCreationAttribs &CreationAttribs) ComErrorDesc ErrDesc(hr); if(CreationAttribs.ppCompilerOutput != nullptr) { - LOG_ERROR_AND_THROW("Failed to compile D3D shader (", ErrDesc.Get(), ")."); + LOG_ERROR_AND_THROW("Failed to compile D3D shader \"", (CreationAttribs.Desc.Name != nullptr ? CreationAttribs.Desc.Name : ""), "\" (", ErrDesc.Get(), ")."); } else { - LOG_ERROR_AND_THROW("Failed to compile D3D shader (", ErrDesc.Get(), "):\n", CompilerMsg != nullptr ? CompilerMsg : ""); + LOG_ERROR_AND_THROW("Failed to compile D3D shader \"", (CreationAttribs.Desc.Name != nullptr ? CreationAttribs.Desc.Name : ""), "\" (", ErrDesc.Get(), "):\n", (CompilerMsg != nullptr ? CompilerMsg : "") ); } } } -- cgit v1.2.3