mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 09:03:36 +00:00
SPIR-V: Functions must always end with a return
This commit is contained in:
parent
be36f6fa5b
commit
a2e4b4b6d8
1 changed files with 6 additions and 0 deletions
|
@ -84,6 +84,12 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
|
||||
Generate(context, function.MainBlock);
|
||||
|
||||
// Functions must always end with a return.
|
||||
if (!(function.MainBlock.Last is AstOperation operation) || operation.Inst != Instruction.Return)
|
||||
{
|
||||
context.Return();
|
||||
}
|
||||
|
||||
context.FunctionEnd();
|
||||
|
||||
if (funcIndex == 0)
|
||||
|
|
Loading…
Reference in a new issue