diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2020-01-25 11:52:14 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-25 11:52:14 +1000 |
| commit | e3a7922e12977ec4a2ea93249568497f3f891e9f (patch) | |
| tree | 8f6e731aba093ff746abf96718ff2566e86278ab /Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp | |
| parent | 42c03c4dadd9e507a91b07bb01ff597bbd1df728 (diff) | |
| parent | e5f6d9320f5ccefa8160bd4a27d156285ae8b536 (diff) | |
Merge pull request #8336 from Ebola16/PS
Add Dolphin version and current video backend to shader compilation logs
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp b/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp index a245935995..7b6beb11b0 100644 --- a/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp +++ b/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp @@ -21,7 +21,9 @@ #include "Common/Logging/Log.h" #include "Common/MsgHandler.h" #include "Common/StringUtil.h" +#include "Common/Version.h" +#include "VideoCommon/VideoBackendBase.h" #include "VideoCommon/VideoConfig.h" namespace Vulkan::ShaderCompiler @@ -142,9 +144,7 @@ std::optional<SPIRVCodeVector> CompileShaderToSPV(EShLanguage stage, const char* auto DumpBadShader = [&](const char* msg) { static int counter = 0; - std::string filename = StringFromFormat( - "%sbad_%s_%04i.txt", File::GetUserPath(D_DUMP_IDX).c_str(), stage_filename, counter++); - + std::string filename = VideoBackendBase::BadShaderFilename(stage_filename, counter++); std::ofstream stream; File::OpenFStream(stream, filename, std::ios_base::out); if (stream.good()) @@ -162,6 +162,10 @@ std::optional<SPIRVCodeVector> CompileShaderToSPV(EShLanguage stage, const char* } } + stream << "\n"; + stream << "Dolphin Version: " + Common::scm_rev_str + "\n"; + stream << "Video Backend: " + g_video_backend->GetDisplayName(); + PanicAlert("%s (written to %s)", msg, filename.c_str()); }; |
