mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 16:15:46 +00:00
glsl: Rework var alloc to not assign unused results
This commit is contained in:
parent
8185a5ab34
commit
33f63cdc22
9 changed files with 91 additions and 49 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue