From 03711dd7b5d44e20fb45c728803ea6b9599dec87 Mon Sep 17 00:00:00 2001
From: gdkchan <gab.dark.100@gmail.com>
Date: Tue, 21 Apr 2020 20:35:28 -0300
Subject: Implement SULD shader instruction (#1117)

* Implement SULD shader instruction

* Some nits
---
 Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs')

diff --git a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
index 4758b08f..f1dd08f2 100644
--- a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
+++ b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
@@ -57,6 +57,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
                 return new AstTextureOperation(
                     inst,
                     texOp.Type,
+                    texOp.Format,
                     texOp.Flags,
                     texOp.Handle,
                     4, // TODO: Non-hardcoded array size.
@@ -118,6 +119,11 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
 
                 if (operation is TextureOperation texOp)
                 {
+                    if (texOp.Inst == Instruction.ImageLoad || texOp.Inst == Instruction.ImageStore)
+                    {
+                        dest.VarType = texOp.Format.GetComponentType();
+                    }
+
                     AstTextureOperation astTexOp = GetAstTextureOperation(texOp);
 
                     if (texOp.Inst == Instruction.ImageLoad)
-- 
cgit v1.2.3-70-g09d2