Fix ForceSetToggle to only warn when an overriden toggle is forced
The condition was partially wrong, causing lots of spurious warning messages when the default toggle (not user override) was forced to another value by the backend. Change-Id: Ie69e275fa3d4ceaeb7c3379dfdc8d8cbb91cf04a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84601 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
08985d46d5
commit
cbdde604b8
|
@ -1661,7 +1661,7 @@ namespace dawn::native {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceBase::ForceSetToggle(Toggle toggle, bool isEnabled) {
|
void DeviceBase::ForceSetToggle(Toggle toggle, bool isEnabled) {
|
||||||
if (!mOverridenToggles.Has(toggle) && mEnabledToggles.Has(toggle) != isEnabled) {
|
if (mOverridenToggles.Has(toggle) && mEnabledToggles.Has(toggle) != isEnabled) {
|
||||||
dawn::WarningLog() << "Forcing toggle \"" << ToggleEnumToName(toggle) << "\" to "
|
dawn::WarningLog() << "Forcing toggle \"" << ToggleEnumToName(toggle) << "\" to "
|
||||||
<< isEnabled << " when it was overriden to be " << !isEnabled;
|
<< isEnabled << " when it was overriden to be " << !isEnabled;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue