Remove stray push constant code.

There was still some logic associated with push constants in Dawn. This
removes it to remove some code and reclaim one buffer in Metal. Related
code was found via `git grep "push constant"`.

BUG=

Change-Id: I17de9d47872483875b6fa292f8259ef1fc4ecaf3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11904
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/metal/PipelineLayoutMTL.mm b/src/dawn_native/metal/PipelineLayoutMTL.mm
index 2469371..491a70a 100644
--- a/src/dawn_native/metal/PipelineLayoutMTL.mm
+++ b/src/dawn_native/metal/PipelineLayoutMTL.mm
@@ -24,8 +24,7 @@
         : PipelineLayoutBase(device, descriptor) {
         // Each stage has its own numbering namespace in CompilerMSL.
         for (auto stage : IterateStages(kAllStages)) {
-            // Buffer number 0 is reserved for push constants
-            uint32_t bufferIndex = 1;
+            uint32_t bufferIndex = 0;
             uint32_t samplerIndex = 0;
             uint32_t textureIndex = 0;
 
diff --git a/src/dawn_native/metal/RenderPipelineMTL.mm b/src/dawn_native/metal/RenderPipelineMTL.mm
index a4ea8c6..6683f1c 100644
--- a/src/dawn_native/metal/RenderPipelineMTL.mm
+++ b/src/dawn_native/metal/RenderPipelineMTL.mm
@@ -365,8 +365,6 @@
 
         descriptorMTL.sampleCount = GetSampleCount();
 
-        // TODO(kainino@chromium.org): push constants, textures, samplers
-
         {
             NSError* error = nil;
             mMtlRenderPipelineState = [mtlDevice newRenderPipelineStateWithDescriptor:descriptorMTL
diff --git a/src/dawn_native/metal/ShaderModuleMTL.mm b/src/dawn_native/metal/ShaderModuleMTL.mm
index 316be54..d27c5aa 100644
--- a/src/dawn_native/metal/ShaderModuleMTL.mm
+++ b/src/dawn_native/metal/ShaderModuleMTL.mm
@@ -73,17 +73,6 @@
         // To make the MSL indices match the indices chosen in the PipelineLayout, we build
         // a table of MSLResourceBinding to give to SPIRV-Cross.
 
-        // Reserve index 0 for buffers for the push constants buffer.
-        for (auto stage : IterateStages(kAllStages)) {
-            spirv_cross::MSLResourceBinding binding;
-            binding.stage = SpirvExecutionModelForStage(stage);
-            binding.desc_set = spirv_cross::kPushConstDescSet;
-            binding.binding = spirv_cross::kPushConstBinding;
-            binding.msl_buffer = 0;
-
-            compiler.add_msl_resource_binding(binding);
-        }
-
         // Create one resource binding entry per stage per binding.
         for (uint32_t group : IterateBitSet(layout->GetBindGroupLayoutsMask())) {
             const auto& bgInfo = layout->GetBindGroupLayout(group)->GetBindingInfo();
diff --git a/src/dawn_native/opengl/ShaderModuleGL.cpp b/src/dawn_native/opengl/ShaderModuleGL.cpp
index e4e8b8f..3059c58 100644
--- a/src/dawn_native/opengl/ShaderModuleGL.cpp
+++ b/src/dawn_native/opengl/ShaderModuleGL.cpp
@@ -69,28 +69,6 @@
 #endif
         compiler.set_common_options(options);
 
-        // Rename the push constant block to be prefixed with the shader stage type so that uniform
-        // names don't match between the FS and the VS.
-        const auto& resources = compiler.get_shader_resources();
-        if (resources.push_constant_buffers.size() > 0) {
-            const char* prefix = nullptr;
-            switch (compiler.get_execution_model()) {
-                case spv::ExecutionModelVertex:
-                    prefix = "vs_";
-                    break;
-                case spv::ExecutionModelFragment:
-                    prefix = "fs_";
-                    break;
-                case spv::ExecutionModelGLCompute:
-                    prefix = "cs_";
-                    break;
-                default:
-                    UNREACHABLE();
-            }
-            auto interfaceBlock = resources.push_constant_buffers[0];
-            compiler.set_name(interfaceBlock.id, prefix + interfaceBlock.name);
-        }
-
         ExtractSpirvInfo(compiler);
 
         const auto& bindingInfo = GetBindingInfo();