[Fix]: fix crash on shader compile

This commit is contained in:
2025-11-22 08:44:04 +08:00
parent e3f73291e9
commit 69cf694ca1
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -671,7 +671,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
const auto& src = shader->GetShaderSource();
const auto& stage =
MG_Util::ConvertGLEnumToString(MG_Util::ConvertShaderStageToGLEnum(shader->GetShaderStage()));
MGLOG_D("Original src @ %s: \n%s", stage.c_str(), src.c_str());
MGLOG_D("Original src @ %s: \n", stage.c_str());
MGLOG_D("%s:", src.empty() ? "" : src.c_str());
}
auto& shaderSpirvs = stateProgramObject->GetGeneratedSpirv();
+1 -1
View File
@@ -72,7 +72,7 @@ namespace MobileGL {
std::string header =
"[" + GetCurrentTime() + "] [" + GetOSName() + " " + GetThreadName() + "/" + levelTag + "]: ";
static char buffer[102400];
static char buffer[1024000];
va_list args;
va_start(args, fmt);
int n = std::vsnprintf(buffer, sizeof(buffer), fmt, args);