1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 22:29:15 +01:00
dxvk/src/spirv/spirv_id_counter.h
2017-10-18 09:50:30 +02:00

32 lines
448 B
C++

#pragma once
#include "spirv_include.h"
namespace dxvk {
/**
* \brief SPIR-V ID counter
*
* Allocates IDs, starting at zero. This is meant
* to be used to allocate unique IDs during code
* generation.
*/
class DxvkSpirvIdCounter {
public:
uint32_t nextId() {
return ++m_id;
}
uint32_t numIds() const {
return m_id;
}
private:
uint32_t m_id = 0;
};
}