Skip to content

Commit

Permalink
metal: Set UseTintIR toggle from WebGPUUseTintIR
Browse files Browse the repository at this point in the history
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 <[email protected]>
Commit-Queue: James Price <[email protected]>
  • Loading branch information
jrprice authored and Dawn LUCI CQ committed Sep 2, 2024
1 parent fdfa973 commit 5c2720d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dawn/native/metal/PhysicalDeviceMTL.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -500,6 +501,10 @@ bool IsGPUCounterSupported(id<MTLDevice> device,
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(
Expand Down

0 comments on commit 5c2720d

Please sign in to comment.