Combine tint toggles.
This CL combines the use tint inspector and use tint generator toggles. Change-Id: Idcfe0ffa1ddbdf0e240dd8d502d0a164018a6e1b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39142 Auto-Submit: dan sinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
05045e0ad8
commit
dc25c98727
|
@ -1160,7 +1160,7 @@ namespace dawn_native {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetDevice()->IsToggleEnabled(Toggle::UseTintInspector)) {
|
if (GetDevice()->IsToggleEnabled(Toggle::UseTintGenerator)) {
|
||||||
#ifdef DAWN_ENABLE_WGSL
|
#ifdef DAWN_ENABLE_WGSL
|
||||||
tint::Program localProgram;
|
tint::Program localProgram;
|
||||||
|
|
||||||
|
|
|
@ -163,12 +163,20 @@ namespace dawn_native {
|
||||||
|
|
||||||
void TogglesSet::Set(Toggle toggle, bool enabled) {
|
void TogglesSet::Set(Toggle toggle, bool enabled) {
|
||||||
ASSERT(toggle != Toggle::InvalidEnum);
|
ASSERT(toggle != Toggle::InvalidEnum);
|
||||||
|
|
||||||
|
if (toggle == Toggle::UseTintInspector)
|
||||||
|
toggle = Toggle::UseTintGenerator;
|
||||||
|
|
||||||
const size_t toggleIndex = static_cast<size_t>(toggle);
|
const size_t toggleIndex = static_cast<size_t>(toggle);
|
||||||
toggleBitset.set(toggleIndex, enabled);
|
toggleBitset.set(toggleIndex, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TogglesSet::Has(Toggle toggle) const {
|
bool TogglesSet::Has(Toggle toggle) const {
|
||||||
ASSERT(toggle != Toggle::InvalidEnum);
|
ASSERT(toggle != Toggle::InvalidEnum);
|
||||||
|
|
||||||
|
if (toggle == Toggle::UseTintInspector)
|
||||||
|
toggle = Toggle::UseTintGenerator;
|
||||||
|
|
||||||
const size_t toggleIndex = static_cast<size_t>(toggle);
|
const size_t toggleIndex = static_cast<size_t>(toggle);
|
||||||
return toggleBitset.test(toggleIndex);
|
return toggleBitset.test(toggleIndex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue