summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt/texture_pass.cpp
diff options
context:
space:
mode:
authorGravatar FernandoS272021-03-26 19:24:50 +0100
committerGravatar ameerj2021-07-22 21:51:24 -0400
commitb5db38f50e9f81964bf0cc946e4ed5b00fe564d0 (patch)
treefefc872d1da6481c8478e4da0381faaaad6f4b75 /src/shader_recompiler/ir_opt/texture_pass.cpp
parentshader: Implement TLD4.PTP (diff)
downloadyuzu-b5db38f50e9f81964bf0cc946e4ed5b00fe564d0.tar.gz
yuzu-b5db38f50e9f81964bf0cc946e4ed5b00fe564d0.tar.xz
yuzu-b5db38f50e9f81964bf0cc946e4ed5b00fe564d0.zip
shader: Add IR opcode for ImageFetch
Diffstat (limited to 'src/shader_recompiler/ir_opt/texture_pass.cpp')
-rw-r--r--src/shader_recompiler/ir_opt/texture_pass.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp
index 454ac3e71..0167dd06e 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) {
51 case IR::Opcode::BindlessImageGatherDref: 51 case IR::Opcode::BindlessImageGatherDref:
52 case IR::Opcode::BoundImageGatherDref: 52 case IR::Opcode::BoundImageGatherDref:
53 return IR::Opcode::ImageGatherDref; 53 return IR::Opcode::ImageGatherDref;
54 case IR::Opcode::BindlessImageFetch:
55 case IR::Opcode::BoundImageFetch:
56 return IR::Opcode::ImageFetch;
54 default: 57 default:
55 return IR::Opcode::Void; 58 return IR::Opcode::Void;
56 } 59 }
@@ -64,6 +67,7 @@ bool IsBindless(const IR::Inst& inst) {
64 case IR::Opcode::BindlessImageSampleDrefExplicitLod: 67 case IR::Opcode::BindlessImageSampleDrefExplicitLod:
65 case IR::Opcode::BindlessImageGather: 68 case IR::Opcode::BindlessImageGather:
66 case IR::Opcode::BindlessImageGatherDref: 69 case IR::Opcode::BindlessImageGatherDref:
70 case IR::Opcode::BindlessImageFetch:
67 return true; 71 return true;
68 case IR::Opcode::BoundImageSampleImplicitLod: 72 case IR::Opcode::BoundImageSampleImplicitLod:
69 case IR::Opcode::BoundImageSampleExplicitLod: 73 case IR::Opcode::BoundImageSampleExplicitLod:
@@ -71,6 +75,7 @@ bool IsBindless(const IR::Inst& inst) {
71 case IR::Opcode::BoundImageSampleDrefExplicitLod: 75 case IR::Opcode::BoundImageSampleDrefExplicitLod:
72 case IR::Opcode::BoundImageGather: 76 case IR::Opcode::BoundImageGather:
73 case IR::Opcode::BoundImageGatherDref: 77 case IR::Opcode::BoundImageGatherDref:
78 case IR::Opcode::BoundImageFetch:
74 return false; 79 return false;
75 default: 80 default:
76 throw InvalidArgument("Invalid opcode {}", inst.Opcode()); 81 throw InvalidArgument("Invalid opcode {}", inst.Opcode());