From c5711ecd9328fc329282c1d054e705d2e6095238 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Mon, 2 Jul 2018 16:55:51 -0700 Subject: [PATCH] Rename GetBindGroupsLayoutMask -> GetBindGroupLayoutsMask --- src/backend/CommandBufferStateTracker.cpp | 2 +- src/backend/PipelineLayout.cpp | 2 +- src/backend/PipelineLayout.h | 3 +-- src/backend/d3d12/PipelineLayoutD3D12.cpp | 2 +- src/backend/metal/PipelineLayoutMTL.mm | 2 +- src/backend/metal/ShaderModuleMTL.mm | 2 +- src/backend/opengl/PipelineGL.cpp | 2 +- src/backend/opengl/PipelineLayoutGL.cpp | 2 +- src/backend/vulkan/PipelineLayoutVk.cpp | 2 +- 9 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/backend/CommandBufferStateTracker.cpp b/src/backend/CommandBufferStateTracker.cpp index 7503b058bd..6003a22b11 100644 --- a/src/backend/CommandBufferStateTracker.cpp +++ b/src/backend/CommandBufferStateTracker.cpp @@ -494,7 +494,7 @@ namespace backend { mAspects.reset(VALIDATION_ASPECT_BIND_GROUPS); mAspects.reset(VALIDATION_ASPECT_VERTEX_BUFFERS); // Reset bindgroups but mark unused bindgroups as valid - mBindgroupsSet = ~layout->GetBindGroupsLayoutMask(); + mBindgroupsSet = ~layout->GetBindGroupLayoutsMask(); // Only bindgroups that were not the same layout in the last pipeline need to be set again. if (mLastPipeline) { diff --git a/src/backend/PipelineLayout.cpp b/src/backend/PipelineLayout.cpp index e47855791c..141b3ec1ba 100644 --- a/src/backend/PipelineLayout.cpp +++ b/src/backend/PipelineLayout.cpp @@ -49,7 +49,7 @@ namespace backend { return mBindGroupLayouts[group].Get(); } - const std::bitset PipelineLayoutBase::GetBindGroupsLayoutMask() const { + const std::bitset PipelineLayoutBase::GetBindGroupLayoutsMask() const { return mMask; } diff --git a/src/backend/PipelineLayout.h b/src/backend/PipelineLayout.h index e11629614e..446b232c62 100644 --- a/src/backend/PipelineLayout.h +++ b/src/backend/PipelineLayout.h @@ -37,8 +37,7 @@ namespace backend { PipelineLayoutBase(DeviceBase* device, const nxt::PipelineLayoutDescriptor* descriptor); const BindGroupLayoutBase* GetBindGroupLayout(size_t group) const; - // XXX: rename to GetBindGroupLayoutsMask? - const std::bitset GetBindGroupsLayoutMask() const; + const std::bitset GetBindGroupLayoutsMask() const; // Utility functions to compute inherited bind groups. // Returns the inherited bind groups as a mask. diff --git a/src/backend/d3d12/PipelineLayoutD3D12.cpp b/src/backend/d3d12/PipelineLayoutD3D12.cpp index 3ee78ed2b0..3165e6a97c 100644 --- a/src/backend/d3d12/PipelineLayoutD3D12.cpp +++ b/src/backend/d3d12/PipelineLayoutD3D12.cpp @@ -43,7 +43,7 @@ namespace backend { namespace d3d12 { uint32_t parameterIndex = 0; uint32_t rangeIndex = 0; - for (uint32_t group : IterateBitSet(GetBindGroupsLayoutMask())) { + for (uint32_t group : IterateBitSet(GetBindGroupLayoutsMask())) { const BindGroupLayout* bindGroupLayout = ToBackend(GetBindGroupLayout(group)); // Set the root descriptor table parameter and copy ranges. Ranges are offset by the diff --git a/src/backend/metal/PipelineLayoutMTL.mm b/src/backend/metal/PipelineLayoutMTL.mm index 49be220ba2..ac5da2b174 100644 --- a/src/backend/metal/PipelineLayoutMTL.mm +++ b/src/backend/metal/PipelineLayoutMTL.mm @@ -29,7 +29,7 @@ namespace backend { namespace metal { uint32_t samplerIndex = 0; uint32_t textureIndex = 0; - for (uint32_t group : IterateBitSet(GetBindGroupsLayoutMask())) { + for (uint32_t group : IterateBitSet(GetBindGroupLayoutsMask())) { const auto& groupInfo = GetBindGroupLayout(group)->GetBindingInfo(); for (size_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) { if (!(groupInfo.visibilities[binding] & StageBit(stage))) { diff --git a/src/backend/metal/ShaderModuleMTL.mm b/src/backend/metal/ShaderModuleMTL.mm index f7ca490e49..c2b9bf910b 100644 --- a/src/backend/metal/ShaderModuleMTL.mm +++ b/src/backend/metal/ShaderModuleMTL.mm @@ -71,7 +71,7 @@ namespace backend { namespace metal { } // Create one resource binding entry per stage per binding. - for (uint32_t group : IterateBitSet(layout->GetBindGroupsLayoutMask())) { + for (uint32_t group : IterateBitSet(layout->GetBindGroupLayoutsMask())) { const auto& bgInfo = layout->GetBindGroupLayout(group)->GetBindingInfo(); for (uint32_t binding : IterateBitSet(bgInfo.mask)) { for (auto stage : IterateStages(bgInfo.visibilities[binding])) { diff --git a/src/backend/opengl/PipelineGL.cpp b/src/backend/opengl/PipelineGL.cpp index 491e1b3521..f2bdfac9ca 100644 --- a/src/backend/opengl/PipelineGL.cpp +++ b/src/backend/opengl/PipelineGL.cpp @@ -126,7 +126,7 @@ namespace backend { namespace opengl { const auto& layout = ToBackend(parent->GetLayout()); const auto& indices = layout->GetBindingIndexInfo(); - for (uint32_t group : IterateBitSet(layout->GetBindGroupsLayoutMask())) { + for (uint32_t group : IterateBitSet(layout->GetBindGroupLayoutsMask())) { const auto& groupInfo = layout->GetBindGroupLayout(group)->GetBindingInfo(); for (uint32_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) { diff --git a/src/backend/opengl/PipelineLayoutGL.cpp b/src/backend/opengl/PipelineLayoutGL.cpp index 77942d6690..52ecab64ad 100644 --- a/src/backend/opengl/PipelineLayoutGL.cpp +++ b/src/backend/opengl/PipelineLayoutGL.cpp @@ -27,7 +27,7 @@ namespace backend { namespace opengl { GLuint sampledTextureIndex = 0; GLuint ssboIndex = 0; - for (uint32_t group : IterateBitSet(GetBindGroupsLayoutMask())) { + for (uint32_t group : IterateBitSet(GetBindGroupLayoutsMask())) { const auto& groupInfo = GetBindGroupLayout(group)->GetBindingInfo(); for (size_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) { diff --git a/src/backend/vulkan/PipelineLayoutVk.cpp b/src/backend/vulkan/PipelineLayoutVk.cpp index 8ef109165a..465ec22634 100644 --- a/src/backend/vulkan/PipelineLayoutVk.cpp +++ b/src/backend/vulkan/PipelineLayoutVk.cpp @@ -29,7 +29,7 @@ namespace backend { namespace vulkan { // this constraints at the NXT level? uint32_t numSetLayouts = 0; std::array setLayouts; - for (uint32_t setIndex : IterateBitSet(GetBindGroupsLayoutMask())) { + for (uint32_t setIndex : IterateBitSet(GetBindGroupLayoutsMask())) { setLayouts[numSetLayouts] = ToBackend(GetBindGroupLayout(setIndex))->GetHandle(); numSetLayouts++; }