From c1517e5ee36934994897e771819a535edb1e070b Mon Sep 17 00:00:00 2001 From: riperiperi Date: Thu, 3 Mar 2022 23:10:51 +0000 Subject: [PATCH] SPIR-V: Use ConstantComposite for Texture Offset Vector Fixes a bunch of freezes with SPIR-V on AMD hardware, and validation errors. Note: Obviously assumes input offsets are constant, which they currently are. --- Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs b/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs index 90a55f626..e9799f48a 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs @@ -1465,7 +1465,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv } var vectorType = context.TypeVector(context.TypeS32(), count); - return context.CompositeConstruct(vectorType, elems); + + return context.ConstantComposite(vectorType, elems); } else {