summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glsl/var_alloc.h
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-31 01:13:22 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:37 +0200
commit9f3ffb996b0d02ca64b492d22ff158e8f3659257 (patch)
tree48993eaf320484cf042071a81a1a6b1dcc829eb9 /src/shader_recompiler/backend/glsl/var_alloc.h
parentglsl: Rework variable allocator to allow for variable reuse (diff)
downloadyuzu-9f3ffb996b0d02ca64b492d22ff158e8f3659257.tar
yuzu-9f3ffb996b0d02ca64b492d22ff158e8f3659257.tar.gz
yuzu-9f3ffb996b0d02ca64b492d22ff158e8f3659257.tar.bz2
yuzu-9f3ffb996b0d02ca64b492d22ff158e8f3659257.tar.lz
yuzu-9f3ffb996b0d02ca64b492d22ff158e8f3659257.tar.xz
yuzu-9f3ffb996b0d02ca64b492d22ff158e8f3659257.tar.zst
yuzu-9f3ffb996b0d02ca64b492d22ff158e8f3659257.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/glsl/var_alloc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/var_alloc.h b/src/shader_recompiler/backend/glsl/var_alloc.h
index 29d78a571..574960b1a 100644
--- a/src/shader_recompiler/backend/glsl/var_alloc.h
+++ b/src/shader_recompiler/backend/glsl/var_alloc.h
@@ -62,9 +62,15 @@ public:
bool uses_temp{};
};
+ /// Used for explicit usages of variables, may revert to temporaries
std::string Define(IR::Inst& inst, GlslVarType type);
std::string Define(IR::Inst& inst, IR::Type type);
+ /// Used to assign variables used by the IR. May return a blank string if
+ /// the instruction's result is unused in the IR.
+ std::string AddDefine(IR::Inst& inst, GlslVarType type);
+ std::string PhiDefine(IR::Inst& inst, IR::Type type);
+
std::string Consume(const IR::Value& value);
std::string ConsumeInst(IR::Inst& inst);