mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 22:41:18 +12:00
Latte: Add support for LOOP_START_NO_AL shader instruction
This instruction is used by Injustice: Gods Among Us and Project Zero Also improved robustness of rendering to be less prone to crashing when a game tries to draw with broken shaders
This commit is contained in:
parent
60adc38205
commit
fa8bab2f39
6 changed files with 16 additions and 10 deletions
|
@ -441,7 +441,8 @@ void LatteDecompiler_analyzeSubroutine(LatteDecompilerShaderContext* shaderConte
|
|||
{
|
||||
shaderContext->analyzer.modifiesPixelActiveState = true;
|
||||
}
|
||||
else if (cfInstruction.type == GPU7_CF_INST_LOOP_START_DX10 || cfInstruction.type == GPU7_CF_INST_LOOP_END)
|
||||
else if (cfInstruction.type == GPU7_CF_INST_LOOP_START_DX10 || cfInstruction.type == GPU7_CF_INST_LOOP_END ||
|
||||
cfInstruction.type == GPU7_CF_INST_LOOP_START_NO_AL)
|
||||
{
|
||||
shaderContext->analyzer.modifiesPixelActiveState = true;
|
||||
}
|
||||
|
@ -685,7 +686,8 @@ void LatteDecompiler_analyze(LatteDecompilerShaderContext* shaderContext, LatteD
|
|||
{
|
||||
shaderContext->analyzer.modifiesPixelActiveState = true;
|
||||
}
|
||||
else if (cfInstruction.type == GPU7_CF_INST_LOOP_START_DX10 || cfInstruction.type == GPU7_CF_INST_LOOP_END)
|
||||
else if (cfInstruction.type == GPU7_CF_INST_LOOP_START_DX10 || cfInstruction.type == GPU7_CF_INST_LOOP_END ||
|
||||
cfInstruction.type == GPU7_CF_INST_LOOP_START_NO_AL)
|
||||
{
|
||||
shaderContext->analyzer.modifiesPixelActiveState = true;
|
||||
shaderContext->analyzer.hasLoops = true;
|
||||
|
@ -929,7 +931,8 @@ void LatteDecompiler_analyze(LatteDecompilerShaderContext* shaderContext, LatteD
|
|||
if (cfCurrentStackDepth < 0)
|
||||
debugBreakpoint();
|
||||
}
|
||||
else if (cfInstruction.type == GPU7_CF_INST_LOOP_START_DX10 || cfInstruction.type == GPU7_CF_INST_LOOP_END)
|
||||
else if (cfInstruction.type == GPU7_CF_INST_LOOP_START_DX10 || cfInstruction.type == GPU7_CF_INST_LOOP_END ||
|
||||
cfInstruction.type == GPU7_CF_INST_LOOP_START_NO_AL)
|
||||
{
|
||||
// no effect on stack depth
|
||||
cfInstruction.activeStackDepth = cfCurrentStackDepth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue