aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-10-04 21:35:26 -0300
committerGitHub <noreply@github.com>2023-10-04 21:35:26 -0300
commit0aceb534cb34287e354f92c37a1b5ebf136e8e74 (patch)
tree848753f6e8439638fa94410bc20f3ef914b90ca6
parenta0af6e4d07f623692943c5fe68b183365b38c812 (diff)
Fix SPIR-V function calls (#5764)1.1.1042
* Fix SPIR-V function calls * Shader cache version bump
-rw-r--r--src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs2
-rw-r--r--src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs13
2 files changed, 4 insertions, 11 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs
index 4ca5fdd4..19601d18 100644
--- a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs
+++ b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs
@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
private const ushort FileFormatVersionMajor = 1;
private const ushort FileFormatVersionMinor = 2;
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
- private const uint CodeGenVersion = 5757;
+ private const uint CodeGenVersion = 5764;
private const string SharedTocFileName = "shared.toc";
private const string SharedDataFileName = "shared.data";
diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs
index 56263e79..50a73ab8 100644
--- a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs
+++ b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs
@@ -316,16 +316,9 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
{
var operand = operation.GetSource(i + 1);
- if (i >= function.InArguments.Length)
- {
- args[i] = context.GetLocalPointer((AstOperand)operand);
- }
- else
- {
- var type = function.GetArgumentType(i);
-
- args[i] = context.Get(type, operand);
- }
+ AstOperand local = (AstOperand)operand;
+ Debug.Assert(local.Type == OperandType.LocalVariable);
+ args[i] = context.GetLocalPointer(local);
}
var retType = function.ReturnType;