glsl: Allow dynamic tracking of variable allocation
This commit is contained in:
parent
465903468e
commit
258106038e
3 changed files with 35 additions and 21 deletions
|
@ -57,11 +57,10 @@ static_assert(sizeof(Id) == sizeof(u32));
|
|||
|
||||
class VarAlloc {
|
||||
public:
|
||||
static constexpr size_t NUM_VARS = 1023;
|
||||
struct UseTracker {
|
||||
size_t num_used{};
|
||||
std::bitset<NUM_VARS> var_use{};
|
||||
bool uses_temp{};
|
||||
size_t num_used{};
|
||||
std::vector<bool> var_use;
|
||||
};
|
||||
|
||||
/// Used for explicit usages of variables, may revert to temporaries
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue