summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/shader_ir.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-12-21 02:49:59 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 21:54:49 +0100
commit2f87fd060d6bed70fb90d97f8c847a0bd03d4c43 (patch)
tree7aad8cb65562a6b304ed692c23d7f6e16ad2d850 /src/video_core/shader/shader_ir.cpp
parentshader_ir: Add attribute getters (diff)
downloadyuzu-2f87fd060d6bed70fb90d97f8c847a0bd03d4c43.tar
yuzu-2f87fd060d6bed70fb90d97f8c847a0bd03d4c43.tar.gz
yuzu-2f87fd060d6bed70fb90d97f8c847a0bd03d4c43.tar.bz2
yuzu-2f87fd060d6bed70fb90d97f8c847a0bd03d4c43.tar.lz
yuzu-2f87fd060d6bed70fb90d97f8c847a0bd03d4c43.tar.xz
yuzu-2f87fd060d6bed70fb90d97f8c847a0bd03d4c43.tar.zst
yuzu-2f87fd060d6bed70fb90d97f8c847a0bd03d4c43.zip
Diffstat (limited to 'src/video_core/shader/shader_ir.cpp')
-rw-r--r--src/video_core/shader/shader_ir.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp
index 0c814fc80..62a139e56 100644
--- a/src/video_core/shader/shader_ir.cpp
+++ b/src/video_core/shader/shader_ir.cpp
@@ -109,6 +109,14 @@ Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buff
return StoreNode(AbufNode(index, static_cast<u32>(element), buffer));
}
+Node ShaderIR::GetInternalFlag(InternalFlag flag, bool negated) {
+ const Node node = StoreNode(InternalFlagNode(flag));
+ if (negated) {
+ return Operation(OperationCode::LogicalNegate, node);
+ }
+ return node;
+}
+
/*static*/ OperationCode ShaderIR::SignedToUnsignedCode(OperationCode operation_code,
bool is_signed) {
if (is_signed) {