[vulkan] Remove AST path for SPIR-V codegen
The AST backend will soon be deleted, and the Tint IR backend should
be used unconditionally.
Bug: 347699874
Change-Id: I2c9f6f563d70f291beb4b78896fc647f711e67ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/202156
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: dan sinclair <dsinclair@google.com>
Reviewed-by: dan sinclair <dsinclair@google.com>
diff --git a/src/dawn/native/vulkan/PhysicalDeviceVk.cpp b/src/dawn/native/vulkan/PhysicalDeviceVk.cpp
index 07d92c0..df2f473 100644
--- a/src/dawn/native/vulkan/PhysicalDeviceVk.cpp
+++ b/src/dawn/native/vulkan/PhysicalDeviceVk.cpp
@@ -672,16 +672,6 @@
// Vulkan SPEC and drivers.
deviceToggles->Default(Toggle::UseTemporaryBufferInCompressedTextureToTextureCopy, true);
- // TODO(crbug.com/345276504): Remove this and associated ShaderModuleVK code after M128 branch.
-#if DAWN_PLATFORM_IS(CHROMEOS)
- // ChromeOS is controlled by the feature flag (which defaults to `true`) for one more release.
- deviceToggles->Default(Toggle::UseTintIR,
- platform->IsFeatureEnabled(platform::Features::kWebGPUUseTintIR));
-#else
- // All other Vulkan platforms are not controlled by the feature flag and use the IR by default.
- deviceToggles->Default(Toggle::UseTintIR, true);
-#endif
-
if (IsAndroidQualcomm()) {
// dawn:1564, dawn:1897: Recording a compute pass after a render pass in the same command
// buffer frequently causes a crash on Qualcomm GPUs. To work around that bug, split the
diff --git a/src/dawn/native/vulkan/ShaderModuleVk.cpp b/src/dawn/native/vulkan/ShaderModuleVk.cpp
index 746115a..9266b2d 100644
--- a/src/dawn/native/vulkan/ShaderModuleVk.cpp
+++ b/src/dawn/native/vulkan/ShaderModuleVk.cpp
@@ -205,7 +205,6 @@
X(std::string_view, entryPointName) \
X(bool, disableSymbolRenaming) \
X(tint::spirv::writer::Options, tintOptions) \
- X(bool, use_tint_ir) \
X(CacheKey::UnsafeUnkeyedValue<dawn::platform::Platform*>, platform) \
X(std::optional<uint32_t>, maxSubgroupSizeForFullSubgroups)
@@ -368,7 +367,6 @@
GetDevice()->IsToggleEnabled(Toggle::VulkanUseBufferRobustAccess2);
req.tintOptions.polyfill_dot_4x8_packed =
GetDevice()->IsToggleEnabled(Toggle::PolyFillPacked4x8DotProduct);
- req.use_tint_ir = GetDevice()->IsToggleEnabled(Toggle::UseTintIR);
req.tintOptions.disable_polyfill_integer_div_mod =
GetDevice()->IsToggleEnabled(Toggle::DisablePolyfillsOnIntegerDivisonAndModulo);
@@ -447,18 +445,14 @@
}
TRACE_EVENT0(r.platform.UnsafeGetValue(), General, "tint::spirv::writer::Generate()");
- tint::Result<tint::spirv::writer::Output> tintResult;
- if (r.use_tint_ir) {
- // Convert the AST program to an IR module.
- auto ir = tint::wgsl::reader::ProgramToLoweredIR(program);
- DAWN_INVALID_IF(ir != tint::Success,
- "An error occurred while generating Tint IR\n%s",
- ir.Failure().reason.Str());
- tintResult = tint::spirv::writer::Generate(ir.Get(), r.tintOptions);
- } else {
- tintResult = tint::spirv::writer::Generate(program, r.tintOptions);
- }
+ // Convert the AST program to an IR module.
+ auto ir = tint::wgsl::reader::ProgramToLoweredIR(program);
+ DAWN_INVALID_IF(ir != tint::Success, "An error occurred while generating Tint IR\n%s",
+ ir.Failure().reason.Str());
+
+ // Generate SPIR-V from Tint IR.
+ auto tintResult = tint::spirv::writer::Generate(ir.Get(), r.tintOptions);
DAWN_INVALID_IF(tintResult != tint::Success,
"An error occurred while generating SPIR-V\n%s",
tintResult.Failure().reason.Str());