Skip to content

Commit

Permalink
Permit the debug instructions in WebGPU SPIR-V - remove from the opti…
Browse files Browse the repository at this point in the history
…mizer (#3083)

continuing #3063
fixing #3052
  • Loading branch information
sarahM0 authored and dj2 committed Dec 3, 2019
1 parent af74105 commit 0a5d99d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
3 changes: 1 addition & 2 deletions source/opt/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ Optimizer& Optimizer::RegisterSizePasses() {
}

Optimizer& Optimizer::RegisterVulkanToWebGPUPasses() {
return RegisterPass(CreateStripDebugInfoPass())
.RegisterPass(CreateStripAtomicCounterMemoryPass())
return RegisterPass(CreateStripAtomicCounterMemoryPass())
.RegisterPass(CreateGenerateWebGPUInitializersPass())
.RegisterPass(CreateLegalizeVectorShufflePass())
.RegisterPass(CreateSplitInvalidUnreachablePass())
Expand Down
30 changes: 0 additions & 30 deletions test/opt/optimizer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ TEST(Optimizer, VulkanToWebGPUSetsCorrectPasses) {
"eliminate-dead-code-aggressive",
"eliminate-dead-const",
"flatten-decorations",
"strip-debug",
"strip-atomic-counter-memory",
"generate-webgpu-initializers",
"legalize-vector-shuffle",
Expand Down Expand Up @@ -330,35 +329,6 @@ INSTANTIATE_TEST_SUITE_P(
"OpFunctionEnd\n",
// pass
"flatten-decorations"},
// Strip Debug
{// input
"OpCapability Shader\n"
"OpCapability VulkanMemoryModel\n"
"OpExtension \"SPV_KHR_vulkan_memory_model\"\n"
"OpMemoryModel Logical Vulkan\n"
"OpEntryPoint Vertex %func \"shader\"\n"
"OpName %main \"main\"\n"
"OpName %void_fn \"void_fn\"\n"
"%void = OpTypeVoid\n"
"%void_f = OpTypeFunction %void\n"
"%func = OpFunction %void None %void_f\n"
"%label = OpLabel\n"
"OpReturn\n"
"OpFunctionEnd\n",
// expected
"OpCapability Shader\n"
"OpCapability VulkanMemoryModel\n"
"OpExtension \"SPV_KHR_vulkan_memory_model\"\n"
"OpMemoryModel Logical Vulkan\n"
"OpEntryPoint Vertex %1 \"shader\"\n"
"%void = OpTypeVoid\n"
"%3 = OpTypeFunction %void\n"
"%1 = OpFunction %void None %3\n"
"%4 = OpLabel\n"
"OpReturn\n"
"OpFunctionEnd\n",
// pass
"strip-debug"},
// Eliminate Dead Constants
{// input
"OpCapability Shader\n"
Expand Down

0 comments on commit 0a5d99d

Please sign in to comment.