From b5db38f50e9f81964bf0cc946e4ed5b00fe564d0 Mon Sep 17 00:00:00 2001
From: FernandoS27 <fsahmkow27@gmail.com>
Date: Fri, 26 Mar 2021 19:24:50 +0100
Subject: shader: Add IR opcode for ImageFetch

---
 src/shader_recompiler/ir_opt/texture_pass.cpp | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/shader_recompiler/ir_opt/texture_pass.cpp')

diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp
index 454ac3e719..0167dd06e2 100644
--- a/src/shader_recompiler/ir_opt/texture_pass.cpp
+++ b/src/shader_recompiler/ir_opt/texture_pass.cpp
@@ -51,6 +51,9 @@ IR::Opcode IndexedInstruction(const IR::Inst& inst) {
     case IR::Opcode::BindlessImageGatherDref:
     case IR::Opcode::BoundImageGatherDref:
         return IR::Opcode::ImageGatherDref;
+    case IR::Opcode::BindlessImageFetch:
+    case IR::Opcode::BoundImageFetch:
+        return IR::Opcode::ImageFetch;
     default:
         return IR::Opcode::Void;
     }
@@ -64,6 +67,7 @@ bool IsBindless(const IR::Inst& inst) {
     case IR::Opcode::BindlessImageSampleDrefExplicitLod:
     case IR::Opcode::BindlessImageGather:
     case IR::Opcode::BindlessImageGatherDref:
+    case IR::Opcode::BindlessImageFetch:
         return true;
     case IR::Opcode::BoundImageSampleImplicitLod:
     case IR::Opcode::BoundImageSampleExplicitLod:
@@ -71,6 +75,7 @@ bool IsBindless(const IR::Inst& inst) {
     case IR::Opcode::BoundImageSampleDrefExplicitLod:
     case IR::Opcode::BoundImageGather:
     case IR::Opcode::BoundImageGatherDref:
+    case IR::Opcode::BoundImageFetch:
         return false;
     default:
         throw InvalidArgument("Invalid opcode {}", inst.Opcode());
-- 
cgit v1.2.3-70-g09d2