mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 13:24:10 +01:00
[dxvk] Implement comparison and setting multiple bits for DxvkBindingSet
This commit is contained in:
parent
5e3336d79b
commit
b7769759f2
@ -77,6 +77,28 @@ namespace dxvk {
|
||||
for (uint32_t i = 0; i < IntCount; i++)
|
||||
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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user