mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 10:24:12 +01:00
[dxvk] Implement comparison and setting multiple bits for DxvkBindingSet
This commit is contained in:
parent
5e3336d79b
commit
b7769759f2
@ -78,6 +78,28 @@ namespace dxvk {
|
|||||||
m_slots[i] = 0;
|
m_slots[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Enables multiple bindings
|
||||||
|
* \param [in] n Number of bindings
|
||||||
|
*/
|
||||||
|
void setFirst(uint32_t n) {
|
||||||
|
for (uint32_t i = 0; i < IntCount; i++) {
|
||||||
|
m_slots[i] = n >= BitCount ? ~0u : ~(~0u << n);
|
||||||
|
n = n >= BitCount ? n - BitCount : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator == (const DxvkBindingSet& other) const {
|
||||||
|
bool eq = true;
|
||||||
|
for (uint32_t i = 0; i < IntCount; i++)
|
||||||
|
eq &= m_slots[i] == other.m_slots[i];
|
||||||
|
return eq;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator != (const DxvkBindingSet& other) const {
|
||||||
|
return !this->operator == (other);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
uint32_t m_slots[IntCount];
|
uint32_t m_slots[IntCount];
|
||||||
|
Loading…
Reference in New Issue
Block a user