summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir/ir_emitter.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-03-28 05:01:28 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:25 +0200
commitdbc1e5cde79b9165605741e1ea7158513ef6499f (patch)
treeba55cdcda905c716ac1bde0463103b425b20bed6 /src/shader_recompiler/frontend/ir/ir_emitter.cpp
parentvk_pipeline_cache: Fix size hashing of shaders (diff)
downloadyuzu-dbc1e5cde79b9165605741e1ea7158513ef6499f.tar
yuzu-dbc1e5cde79b9165605741e1ea7158513ef6499f.tar.gz
yuzu-dbc1e5cde79b9165605741e1ea7158513ef6499f.tar.bz2
yuzu-dbc1e5cde79b9165605741e1ea7158513ef6499f.tar.lz
yuzu-dbc1e5cde79b9165605741e1ea7158513ef6499f.tar.xz
yuzu-dbc1e5cde79b9165605741e1ea7158513ef6499f.tar.zst
yuzu-dbc1e5cde79b9165605741e1ea7158513ef6499f.zip
Diffstat (limited to 'src/shader_recompiler/frontend/ir/ir_emitter.cpp')
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
index d6a1d8ec2..9b898e4e1 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
@@ -1183,6 +1183,14 @@ U32 IREmitter::IMax(const U32& a, const U32& b, bool is_signed) {
return is_signed ? SMax(a, b) : UMax(a, b);
}
+U32 IREmitter::SClamp(const U32& value, const U32& min, const U32& max) {
+ return Inst<U32>(Opcode::SClamp32, value, min, max);
+}
+
+U32 IREmitter::UClamp(const U32& value, const U32& min, const U32& max) {
+ return Inst<U32>(Opcode::UClamp32, value, min, max);
+}
+
U1 IREmitter::ILessThan(const U32& lhs, const U32& rhs, bool is_signed) {
return Inst<U1>(is_signed ? Opcode::SLessThan : Opcode::ULessThan, lhs, rhs);
}