mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 17:35:30 +00:00
Support higher limits for maxDynamicUniform/StorageBuffers
The higher tier currently supports all D3D12 devices, all Metal, and most Vulkan devices. Bug: dawn:685 Change-Id: I5bcb778b92a073c9c1af943acee193073c0741ff Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121101 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
@@ -231,8 +231,7 @@ class BindGroupTracker : public BindGroupTrackerBase<false, uint64_t> {
|
||||
void Apply(const OpenGLFunctions& gl) {
|
||||
BeforeApply();
|
||||
for (BindGroupIndex index : IterateBitSet(mDirtyBindGroupsObjectChangedOrIsDynamic)) {
|
||||
ApplyBindGroup(gl, index, mBindGroups[index], mDynamicOffsetCounts[index],
|
||||
mDynamicOffsets[index].data());
|
||||
ApplyBindGroup(gl, index, mBindGroups[index], mDynamicOffsets[index]);
|
||||
}
|
||||
AfterApply();
|
||||
}
|
||||
@@ -241,10 +240,8 @@ class BindGroupTracker : public BindGroupTrackerBase<false, uint64_t> {
|
||||
void ApplyBindGroup(const OpenGLFunctions& gl,
|
||||
BindGroupIndex index,
|
||||
BindGroupBase* group,
|
||||
uint32_t dynamicOffsetCount,
|
||||
uint64_t* dynamicOffsets) {
|
||||
const ityp::vector<BindingIndex, uint64_t>& dynamicOffsets) {
|
||||
const auto& indices = ToBackend(mPipelineLayout)->GetBindingIndexInfo()[index];
|
||||
uint32_t currentDynamicOffsetIndex = 0;
|
||||
|
||||
for (BindingIndex bindingIndex{0}; bindingIndex < group->GetLayout()->GetBindingCount();
|
||||
++bindingIndex) {
|
||||
@@ -268,8 +265,8 @@ class BindGroupTracker : public BindGroupTrackerBase<false, uint64_t> {
|
||||
GLuint offset = binding.offset;
|
||||
|
||||
if (bindingInfo.buffer.hasDynamicOffset) {
|
||||
offset += dynamicOffsets[currentDynamicOffsetIndex];
|
||||
++currentDynamicOffsetIndex;
|
||||
// Dynamic buffers are packed at the front of BindingIndices.
|
||||
offset += dynamicOffsets[bindingIndex];
|
||||
}
|
||||
|
||||
GLenum target;
|
||||
|
||||
Reference in New Issue
Block a user