aco/util: fix bit_reference::operator&=

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 24.3
(cherry picked from commit 46787fc2d0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
This commit is contained in:
Rhys Perry
2025-01-08 12:32:37 +00:00
committed by Dylan Baker
parent ded07d7161
commit d9a841d799
2 changed files with 2 additions and 2 deletions

View File

@@ -1204,7 +1204,7 @@
"description": "aco/util: fix bit_reference::operator&=",
"nominated": true,
"nomination_type": 4,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View File

@@ -793,7 +793,7 @@ template <typename T> struct bit_reference {
constexpr bit_reference& operator&=(bool val)
{
storage &= T(val) << bit;
storage &= ~(T(!val) << bit);
return *this;
}