Removes duplicated maxBufferSize in limit macros.

- Note the duplication (in LIMITS_MAX_BUFFER_SIZE and LIMITS_OTHER)
  caused tiering to be overridden.
- Also updated binding size test to align buffer sizes properly since
  the test was failing locally for me.

Fixes: dawn:1683
Change-Id: I8d05f863ea9bf4dc8e620b7803bedb913af9f67b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122260
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Loko Kung
2023-03-02 21:51:03 +00:00
committed by Dawn LUCI CQ
parent 6cc183c85a
commit 861dfd89e8
5 changed files with 37 additions and 8 deletions

View File

@@ -71,6 +71,12 @@ MaybeError AdapterBase::Initialize() {
mLimits.v1.maxUniformBuffersPerShaderStage =
std::min(mLimits.v1.maxUniformBuffersPerShaderStage, kMaxUniformBuffersPerShaderStage);
// Additional enforcement for dependent limits.
mLimits.v1.maxStorageBufferBindingSize =
std::min(mLimits.v1.maxStorageBufferBindingSize, mLimits.v1.maxBufferSize);
mLimits.v1.maxUniformBufferBindingSize =
std::min(mLimits.v1.maxUniformBufferBindingSize, mLimits.v1.maxBufferSize);
return {};
}

View File

@@ -68,7 +68,6 @@
X(Alignment, minUniformBufferOffsetAlignment, 256, 256) \
X(Alignment, minStorageBufferOffsetAlignment, 256, 256) \
X(Maximum, maxVertexBuffers, 8, 8) \
X(Maximum, maxBufferSize, 268435456, 268435456) \
X(Maximum, maxVertexAttributes, 16, 16) \
X(Maximum, maxVertexBufferArrayStride, 2048, 2048) \
X(Maximum, maxInterStageShaderComponents, 60, 60) \