Merge pull request #11022 from merryhime/ambiguous-reversed-operator
MTLObjectCache: Correct signature of equality operator
This commit is contained in:
commit
fb88a4e14c
|
@ -37,8 +37,8 @@ struct DepthStencilSelector
|
||||||
bool UpdateEnable() const { return value & 1; }
|
bool UpdateEnable() const { return value & 1; }
|
||||||
enum CompareMode CompareMode() const { return static_cast<enum CompareMode>(value >> 1); }
|
enum CompareMode CompareMode() const { return static_cast<enum CompareMode>(value >> 1); }
|
||||||
|
|
||||||
bool operator==(const DepthStencilSelector& other) { return value == other.value; }
|
bool operator==(const DepthStencilSelector& other) const { return value == other.value; }
|
||||||
bool operator!=(const DepthStencilSelector& other) { return !(*this == other); }
|
bool operator!=(const DepthStencilSelector& other) const { return !(*this == other); }
|
||||||
static constexpr size_t N_VALUES = 1 << 4;
|
static constexpr size_t N_VALUES = 1 << 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -63,8 +63,8 @@ struct SamplerSelector
|
||||||
WrapMode WrapV() const { return static_cast<WrapMode>((value >> 4) / 3); }
|
WrapMode WrapV() const { return static_cast<WrapMode>((value >> 4) / 3); }
|
||||||
bool AnisotropicFiltering() const { return ((value >> 3) & 1); }
|
bool AnisotropicFiltering() const { return ((value >> 3) & 1); }
|
||||||
|
|
||||||
bool operator==(const SamplerSelector& other) { return value == other.value; }
|
bool operator==(const SamplerSelector& other) const { return value == other.value; }
|
||||||
bool operator!=(const SamplerSelector& other) { return !(*this == other); }
|
bool operator!=(const SamplerSelector& other) const { return !(*this == other); }
|
||||||
static constexpr size_t N_VALUES = (1 << 4) * 9;
|
static constexpr size_t N_VALUES = (1 << 4) * 9;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue