dawn_native: Turn the DisallowUnsafeAPIs toggle on by default.
Bug: chromium:1138528 Change-Id: Iaad55e6776f3e6abcc0983ad05a1f76b0482e14c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39504 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
1b5526457f
commit
07987ede36
|
@ -1180,6 +1180,7 @@ namespace dawn_native {
|
||||||
|
|
||||||
void DeviceBase::SetDefaultToggles() {
|
void DeviceBase::SetDefaultToggles() {
|
||||||
SetToggle(Toggle::LazyClearResourceOnFirstUse, true);
|
SetToggle(Toggle::LazyClearResourceOnFirstUse, true);
|
||||||
|
SetToggle(Toggle::DisallowUnsafeAPIs, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceBase::ApplyToggleOverrides(const DeviceDescriptor* deviceDescriptor) {
|
void DeviceBase::ApplyToggleOverrides(const DeviceDescriptor* deviceDescriptor) {
|
||||||
|
|
|
@ -801,6 +801,9 @@ void DawnTestBase::SetUp() {
|
||||||
deviceDescriptor.forceDisabledToggles = mParam.forceDisabledWorkarounds;
|
deviceDescriptor.forceDisabledToggles = mParam.forceDisabledWorkarounds;
|
||||||
deviceDescriptor.requiredExtensions = GetRequiredExtensions();
|
deviceDescriptor.requiredExtensions = GetRequiredExtensions();
|
||||||
|
|
||||||
|
// Disabled disallowing unsafe APIs so we can test them.
|
||||||
|
deviceDescriptor.forceDisabledToggles.push_back("disallow_unsafe_apis");
|
||||||
|
|
||||||
for (const std::string& toggle : gTestEnv->GetEnabledToggles()) {
|
for (const std::string& toggle : gTestEnv->GetEnabledToggles()) {
|
||||||
const dawn_native::ToggleInfo* info =
|
const dawn_native::ToggleInfo* info =
|
||||||
gTestEnv->GetInstance()->GetToggleInfo(toggle.c_str());
|
gTestEnv->GetInstance()->GetToggleInfo(toggle.c_str());
|
||||||
|
|
|
@ -155,7 +155,10 @@ bool ValidationTest::HasToggleEnabled(const char* toggle) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
WGPUDevice ValidationTest::CreateTestDevice() {
|
WGPUDevice ValidationTest::CreateTestDevice() {
|
||||||
return adapter.CreateDevice();
|
// Disabled disallowing unsafe APIs so we can test them.
|
||||||
|
dawn_native::DeviceDescriptor deviceDescriptor;
|
||||||
|
deviceDescriptor.forceDisabledToggles.push_back("disallow_unsafe_apis");
|
||||||
|
return adapter.CreateDevice(&deviceDescriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|
Loading…
Reference in New Issue