mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 17:05:31 +00:00
Remove kMaxBindingsPerGroup limit
kMaxBindingsPerGroup is not a real WebGPU limit. Code in Dawn that uses it now uses dynamically sized vectors, optimistic stack_vecs or a different limit like kMaxDynamicBuffersPerPipelineLayout. The CL introduces kMaxOptimalBindingsPerGroup=32 which is used to size the static portion of stack_vecs, but the value is tentative. Bug: dawn:443 Change-Id: I08e06bed6531bed8b4365f36cf2fc0579ac5f180 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23502 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
8b441db771
commit
b31f5e717e
@@ -36,10 +36,6 @@ namespace dawn_native { namespace opengl {
|
||||
const PipelineLayout* layout,
|
||||
const PerStage<const ShaderModule*>& modules);
|
||||
|
||||
using BindingLocations = ityp::array<BindGroupIndex,
|
||||
ityp::array<BindingIndex, GLint, kMaxBindingsPerGroup>,
|
||||
kMaxBindGroups>;
|
||||
|
||||
// For each unit a sampler is bound to we need to know if we should use filtering or not
|
||||
// because int and uint texture are only complete without filtering.
|
||||
struct SamplerUnit {
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace dawn_native { namespace opengl {
|
||||
|
||||
for (BindGroupIndex group : IterateBitSet(GetBindGroupLayoutsMask())) {
|
||||
const BindGroupLayoutBase* bgl = GetBindGroupLayout(group);
|
||||
mIndexInfo[group].resize(bgl->GetBindingCount());
|
||||
|
||||
for (BindingIndex bindingIndex{0}; bindingIndex < bgl->GetBindingCount();
|
||||
++bindingIndex) {
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "dawn_native/PipelineLayout.h"
|
||||
|
||||
#include "common/ityp_array.h"
|
||||
#include "common/ityp_vector.h"
|
||||
#include "dawn_native/BindingInfo.h"
|
||||
#include "dawn_native/opengl/opengl_platform.h"
|
||||
|
||||
@@ -30,9 +31,7 @@ namespace dawn_native { namespace opengl {
|
||||
PipelineLayout(Device* device, const PipelineLayoutDescriptor* descriptor);
|
||||
|
||||
using BindingIndexInfo =
|
||||
ityp::array<BindGroupIndex,
|
||||
ityp::array<BindingIndex, GLuint, kMaxBindingsPerGroup>,
|
||||
kMaxBindGroups>;
|
||||
ityp::array<BindGroupIndex, ityp::vector<BindingIndex, GLuint>, kMaxBindGroups>;
|
||||
const BindingIndexInfo& GetBindingIndexInfo() const;
|
||||
|
||||
GLuint GetTextureUnitsUsed() const;
|
||||
|
||||
Reference in New Issue
Block a user