mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 22:45:45 +00:00
glsl: WIP var forward declaration
to fix Loop control flow.
This commit is contained in:
parent
c797a0c5a5
commit
72974388fb
6 changed files with 60 additions and 49 deletions
|
@ -5,6 +5,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <bitset>
|
||||
#include <vector>
|
||||
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_types.h"
|
||||
|
@ -61,19 +62,21 @@ public:
|
|||
std::string Define(IR::Inst& inst, IR::Type type);
|
||||
|
||||
std::string Consume(const IR::Value& value);
|
||||
std::string Consume(IR::Inst& inst);
|
||||
|
||||
std::string GetGlslType(Type type);
|
||||
std::string GetGlslType(IR::Type type);
|
||||
|
||||
size_t num_used_registers{};
|
||||
std::vector<std::string> reg_types;
|
||||
|
||||
private:
|
||||
static constexpr size_t NUM_REGS = 4096;
|
||||
static constexpr size_t NUM_ELEMENTS = 4;
|
||||
|
||||
std::string Consume(IR::Inst& inst);
|
||||
Type RegType(IR::Type type);
|
||||
Id Alloc();
|
||||
void Free(Id id);
|
||||
|
||||
size_t num_used_registers{};
|
||||
std::bitset<NUM_REGS> register_use{};
|
||||
std::bitset<NUM_REGS> register_defined{};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue