mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Add Dolphin version and current video backend to shader compilation logs
This commit is contained in:
@ -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());
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user