diff --git a/src/ShaderCache.cpp b/src/ShaderCache.cpp index ac8e18a74..1cee4fbed 100644 --- a/src/ShaderCache.cpp +++ b/src/ShaderCache.cpp @@ -1246,6 +1246,8 @@ namespace SIE cache.AddCompletedShader(shaderClass, shader, descriptor, nullptr); return nullptr; } + if (errorBlob) + logger::debug("Shader logs:\n{}", static_cast(errorBlob->GetBufferPointer())); logger::debug("Compiled shader {}:{}:{:X}", magic_enum::enum_name(type), magic_enum::enum_name(shaderClass), descriptor); // strip debug info diff --git a/src/Util.cpp b/src/Util.cpp index 00fd3e5b9..8c8336924 100644 --- a/src/Util.cpp +++ b/src/Util.cpp @@ -169,11 +169,11 @@ namespace Util } logger::debug("Compiling {} with {}", str, DefinesToString(macros)); if (FAILED(D3DCompileFromFile(FilePath, macros.data(), D3D_COMPILE_STANDARD_FILE_INCLUDE, Program, ProgramType, flags, 0, &shaderBlob, &shaderErrors))) { - logger::warn("Shader compilation failed:\n\n{}", shaderErrors ? (const char*)shaderErrors->GetBufferPointer() : "Unknown error"); + logger::warn("Shader compilation failed:\n\n{}", shaderErrors ? static_cast(shaderErrors->GetBufferPointer()) : "Unknown error"); return nullptr; } if (shaderErrors) - logger::debug("Shader logs:\n{}", (const char*)shaderErrors->GetBufferPointer()); + logger::debug("Shader logs:\n{}", static_cast(shaderErrors->GetBufferPointer())); if (!_stricmp(ProgramType, "ps_5_0")) { ID3D11PixelShader* regShader; device->CreatePixelShader(shaderBlob->GetBufferPointer(), shaderBlob->GetBufferSize(), nullptr, ®Shader);