Rename GetBindGroupsLayoutMask -> GetBindGroupLayoutsMask

This commit is contained in:
Kai Ninomiya 2018-07-02 16:55:51 -07:00 committed by Kai Ninomiya
parent 311e2a44b9
commit c5711ecd93
9 changed files with 9 additions and 10 deletions

View File

@ -494,7 +494,7 @@ namespace backend {
mAspects.reset(VALIDATION_ASPECT_BIND_GROUPS); mAspects.reset(VALIDATION_ASPECT_BIND_GROUPS);
mAspects.reset(VALIDATION_ASPECT_VERTEX_BUFFERS); mAspects.reset(VALIDATION_ASPECT_VERTEX_BUFFERS);
// Reset bindgroups but mark unused bindgroups as valid // 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. // Only bindgroups that were not the same layout in the last pipeline need to be set again.
if (mLastPipeline) { if (mLastPipeline) {

View File

@ -49,7 +49,7 @@ namespace backend {
return mBindGroupLayouts[group].Get(); return mBindGroupLayouts[group].Get();
} }
const std::bitset<kMaxBindGroups> PipelineLayoutBase::GetBindGroupsLayoutMask() const { const std::bitset<kMaxBindGroups> PipelineLayoutBase::GetBindGroupLayoutsMask() const {
return mMask; return mMask;
} }

View File

@ -37,8 +37,7 @@ namespace backend {
PipelineLayoutBase(DeviceBase* device, const nxt::PipelineLayoutDescriptor* descriptor); PipelineLayoutBase(DeviceBase* device, const nxt::PipelineLayoutDescriptor* descriptor);
const BindGroupLayoutBase* GetBindGroupLayout(size_t group) const; const BindGroupLayoutBase* GetBindGroupLayout(size_t group) const;
// XXX: rename to GetBindGroupLayoutsMask? const std::bitset<kMaxBindGroups> GetBindGroupLayoutsMask() const;
const std::bitset<kMaxBindGroups> GetBindGroupsLayoutMask() const;
// Utility functions to compute inherited bind groups. // Utility functions to compute inherited bind groups.
// Returns the inherited bind groups as a mask. // Returns the inherited bind groups as a mask.

View File

@ -43,7 +43,7 @@ namespace backend { namespace d3d12 {
uint32_t parameterIndex = 0; uint32_t parameterIndex = 0;
uint32_t rangeIndex = 0; uint32_t rangeIndex = 0;
for (uint32_t group : IterateBitSet(GetBindGroupsLayoutMask())) { for (uint32_t group : IterateBitSet(GetBindGroupLayoutsMask())) {
const BindGroupLayout* bindGroupLayout = ToBackend(GetBindGroupLayout(group)); const BindGroupLayout* bindGroupLayout = ToBackend(GetBindGroupLayout(group));
// Set the root descriptor table parameter and copy ranges. Ranges are offset by the // Set the root descriptor table parameter and copy ranges. Ranges are offset by the

View File

@ -29,7 +29,7 @@ namespace backend { namespace metal {
uint32_t samplerIndex = 0; uint32_t samplerIndex = 0;
uint32_t textureIndex = 0; uint32_t textureIndex = 0;
for (uint32_t group : IterateBitSet(GetBindGroupsLayoutMask())) { for (uint32_t group : IterateBitSet(GetBindGroupLayoutsMask())) {
const auto& groupInfo = GetBindGroupLayout(group)->GetBindingInfo(); const auto& groupInfo = GetBindGroupLayout(group)->GetBindingInfo();
for (size_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) { for (size_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) {
if (!(groupInfo.visibilities[binding] & StageBit(stage))) { if (!(groupInfo.visibilities[binding] & StageBit(stage))) {

View File

@ -71,7 +71,7 @@ namespace backend { namespace metal {
} }
// Create one resource binding entry per stage per binding. // 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(); const auto& bgInfo = layout->GetBindGroupLayout(group)->GetBindingInfo();
for (uint32_t binding : IterateBitSet(bgInfo.mask)) { for (uint32_t binding : IterateBitSet(bgInfo.mask)) {
for (auto stage : IterateStages(bgInfo.visibilities[binding])) { for (auto stage : IterateStages(bgInfo.visibilities[binding])) {

View File

@ -126,7 +126,7 @@ namespace backend { namespace opengl {
const auto& layout = ToBackend(parent->GetLayout()); const auto& layout = ToBackend(parent->GetLayout());
const auto& indices = layout->GetBindingIndexInfo(); 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(); const auto& groupInfo = layout->GetBindGroupLayout(group)->GetBindingInfo();
for (uint32_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) { for (uint32_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) {

View File

@ -27,7 +27,7 @@ namespace backend { namespace opengl {
GLuint sampledTextureIndex = 0; GLuint sampledTextureIndex = 0;
GLuint ssboIndex = 0; GLuint ssboIndex = 0;
for (uint32_t group : IterateBitSet(GetBindGroupsLayoutMask())) { for (uint32_t group : IterateBitSet(GetBindGroupLayoutsMask())) {
const auto& groupInfo = GetBindGroupLayout(group)->GetBindingInfo(); const auto& groupInfo = GetBindGroupLayout(group)->GetBindingInfo();
for (size_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) { for (size_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) {

View File

@ -29,7 +29,7 @@ namespace backend { namespace vulkan {
// this constraints at the NXT level? // this constraints at the NXT level?
uint32_t numSetLayouts = 0; uint32_t numSetLayouts = 0;
std::array<VkDescriptorSetLayout, kMaxBindGroups> setLayouts; std::array<VkDescriptorSetLayout, kMaxBindGroups> setLayouts;
for (uint32_t setIndex : IterateBitSet(GetBindGroupsLayoutMask())) { for (uint32_t setIndex : IterateBitSet(GetBindGroupLayoutsMask())) {
setLayouts[numSetLayouts] = ToBackend(GetBindGroupLayout(setIndex))->GetHandle(); setLayouts[numSetLayouts] = ToBackend(GetBindGroupLayout(setIndex))->GetHandle();
numSetLayouts++; numSetLayouts++;
} }