metal: Set UseTintIR toggle from WebGPUUseTintIR
Use the platform feature to set the default value of the UseTintIR
toggle in the Metal backend, in preparation for the Finch trial.
Bug: 42251016
Change-Id: I8d7f2437065851759c3e93dac0bd3b1d5b816519
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/204714
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/src/dawn/native/metal/PhysicalDeviceMTL.mm b/src/dawn/native/metal/PhysicalDeviceMTL.mm
index bf80760..feddc3c 100644
--- a/src/dawn/native/metal/PhysicalDeviceMTL.mm
+++ b/src/dawn/native/metal/PhysicalDeviceMTL.mm
@@ -39,6 +39,7 @@
#include "dawn/native/metal/BufferMTL.h"
#include "dawn/native/metal/DeviceMTL.h"
#include "dawn/native/metal/UtilsMetal.h"
+#include "dawn/platform/DawnPlatform.h"
#if DAWN_PLATFORM_IS(MACOS)
#import <IOKit/IOKitLib.h>
@@ -500,6 +501,10 @@
gpu_info::IsIrisPlus655(deviceId));
}
+ // Use the Tint IR backend by default if the corresponding platform feature is enabled.
+ deviceToggles->Default(Toggle::UseTintIR,
+ platform->IsFeatureEnabled(platform::Features::kWebGPUUseTintIR));
+
#if DAWN_PLATFORM_IS(MACOS)
if (gpu_info::IsIntel(vendorId)) {
deviceToggles->Default(