Remove use of EmitVertexPointSize transform
This is now handled inside the SPIR-V sanitizing transform and can be
enabled via a transform config option.
Fixed: tint:753
Change-Id: I897c60dd304dd4643cc905a8ca3001dd963c5fb0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50060
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp
index 5e5762f..6903485 100644
--- a/src/dawn_native/ShaderModule.cpp
+++ b/src/dawn_native/ShaderModule.cpp
@@ -1106,11 +1106,14 @@
parseResult->tintSource = std::move(tintSource);
} else {
tint::transform::Manager transformManager;
- transformManager.Add<tint::transform::EmitVertexPointSize>();
transformManager.Add<tint::transform::Spirv>();
tint::transform::DataMap transformInputs;
+ tint::transform::Spirv::Config spirv_cfg;
+ spirv_cfg.emit_vertex_point_size = true;
+ transformInputs.Add<tint::transform::Spirv::Config>(spirv_cfg);
+
DAWN_TRY_ASSIGN(program, RunTransforms(&transformManager, &program,
transformInputs, nullptr, outMessages));
@@ -1309,13 +1312,17 @@
tint::transform::Manager transformManager;
transformManager.Add<tint::transform::VertexPulling>();
- transformManager.Add<tint::transform::EmitVertexPointSize>();
transformManager.Add<tint::transform::Spirv>();
if (GetDevice()->IsRobustnessEnabled()) {
transformManager.Add<tint::transform::BoundArrayAccessors>();
}
tint::transform::DataMap transformInputs;
+
+ tint::transform::Spirv::Config spirv_cfg;
+ spirv_cfg.emit_vertex_point_size = true;
+ transformInputs.Add<tint::transform::Spirv::Config>(spirv_cfg);
+
AddVertexPullingTransformConfig(vertexState, entryPoint, pullingBufferBindingSet,
&transformInputs);
diff --git a/src/dawn_native/vulkan/ShaderModuleVk.cpp b/src/dawn_native/vulkan/ShaderModuleVk.cpp
index 2f181d8..2f09efa 100644
--- a/src/dawn_native/vulkan/ShaderModuleVk.cpp
+++ b/src/dawn_native/vulkan/ShaderModuleVk.cpp
@@ -58,11 +58,14 @@
if (GetDevice()->IsRobustnessEnabled()) {
transformManager.Add<tint::transform::BoundArrayAccessors>();
}
- transformManager.Add<tint::transform::EmitVertexPointSize>();
transformManager.Add<tint::transform::Spirv>();
tint::transform::DataMap transformInputs;
+ tint::transform::Spirv::Config spirv_cfg;
+ spirv_cfg.emit_vertex_point_size = true;
+ transformInputs.Add<tint::transform::Spirv::Config>(spirv_cfg);
+
tint::Program program;
DAWN_TRY_ASSIGN(program,
RunTransforms(&transformManager, parseResult->tintProgram.get(),