mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-26 02:54:17 +01:00
Latte: Fix shader compilation error when subroutines are used
Fixes character colors in Tekken Tag Tournament 2
This commit is contained in:
parent
b902aa2048
commit
92ab87b049
@ -4037,8 +4037,8 @@ void LatteDecompiler_emitGLSLShader(LatteDecompilerShaderContext* shaderContext,
|
|||||||
for (auto& subroutineInfo : shaderContext->list_subroutines)
|
for (auto& subroutineInfo : shaderContext->list_subroutines)
|
||||||
{
|
{
|
||||||
sint32 subroutineMaxStackDepth = 0;
|
sint32 subroutineMaxStackDepth = 0;
|
||||||
src->addFmt("bool activeMaskStackSub%04x[{}];" _CRLF, subroutineInfo.cfAddr, subroutineMaxStackDepth + 1);
|
src->addFmt("bool activeMaskStackSub{:04x}[{}];" _CRLF, subroutineInfo.cfAddr, subroutineMaxStackDepth + 1);
|
||||||
src->addFmt("bool activeMaskStackCSub%04x[{}];" _CRLF, subroutineInfo.cfAddr, subroutineMaxStackDepth + 2);
|
src->addFmt("bool activeMaskStackCSub{:04x}[{}];" _CRLF, subroutineInfo.cfAddr, subroutineMaxStackDepth + 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// helper variables for cube maps (todo: Only emit when used)
|
// helper variables for cube maps (todo: Only emit when used)
|
||||||
|
@ -335,6 +335,7 @@ void RendererShaderVk::CompileInternal(bool isRenderThread)
|
|||||||
if (!Shader.parse(&Resources, 100, false, messagesParseLink))
|
if (!Shader.parse(&Resources, 100, false, messagesParseLink))
|
||||||
{
|
{
|
||||||
cemuLog_log(LogType::Force, fmt::format("GLSL parsing failed for {:016x}_{:016x}: \"{}\"", m_baseHash, m_auxHash, Shader.getInfoLog()));
|
cemuLog_log(LogType::Force, fmt::format("GLSL parsing failed for {:016x}_{:016x}: \"{}\"", m_baseHash, m_auxHash, Shader.getInfoLog()));
|
||||||
|
cemuLog_logDebug(LogType::Force, "GLSL source:\n{}", m_glslCode);
|
||||||
cemu_assert_debug(false);
|
cemu_assert_debug(false);
|
||||||
FinishCompilation();
|
FinishCompilation();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user