Make maxBindingsPerBindGroup 1000

To follow the WebGPU spec update
https://github.com/gpuweb/gpuweb/pull/4050

Bug: dawn:1767
Change-Id: Iec5c60de7af5cb8b8e1baa7fc378a6551c6b5bd1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129380
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
This commit is contained in:
Takahiro 2023-04-27 13:51:54 +00:00 committed by Dawn LUCI CQ
parent 5e344a338f
commit 5e4aad952e
4 changed files with 20 additions and 5 deletions

View File

@ -19,7 +19,7 @@
#include <cstdint>
static constexpr uint32_t kMaxBindGroups = 4u;
static constexpr uint32_t kMaxBindingsPerBindGroup = 640u;
static constexpr uint32_t kMaxBindingsPerBindGroup = 1000u;
static constexpr uint8_t kMaxVertexAttributes = 16u;
static constexpr uint8_t kMaxVertexBuffers = 8u;
static constexpr uint32_t kMaxVertexBufferArrayStride = 2048u;

View File

@ -63,7 +63,7 @@
X(Maximum, maxTextureDimension3D, 2048, 2048) \
X(Maximum, maxTextureArrayLayers, 256, 256) \
X(Maximum, maxBindGroups, 4, 4) \
X(Maximum, maxBindingsPerBindGroup, 640, 640) \
X(Maximum, maxBindingsPerBindGroup, 1000, 1000) \
X(Maximum, maxUniformBufferBindingSize, 65536, 65536) \
X(Alignment, minUniformBufferOffsetAlignment, 256, 256) \
X(Alignment, minStorageBufferOffsetAlignment, 256, 256) \

View File

@ -577,14 +577,14 @@ struct Buf {
// Test that @binding must be less then kMaxBindingsPerBindGroup
TEST_F(ShaderModuleValidationTest, MaxBindingNumber) {
static_assert(kMaxBindingsPerBindGroup == 640);
static_assert(kMaxBindingsPerBindGroup == 1000);
wgpu::ComputePipelineDescriptor desc;
desc.compute.entryPoint = "main";
// kMaxBindingsPerBindGroup-1 is valid.
desc.compute.module = utils::CreateShaderModule(device, R"(
@group(0) @binding(639) var s : sampler;
@group(0) @binding(999) var s : sampler;
@compute @workgroup_size(1) fn main() {
_ = s;
}
@ -593,7 +593,7 @@ TEST_F(ShaderModuleValidationTest, MaxBindingNumber) {
// kMaxBindingsPerBindGroup is an error
desc.compute.module = utils::CreateShaderModule(device, R"(
@group(0) @binding(640) var s : sampler;
@group(0) @binding(1000) var s : sampler;
@compute @workgroup_size(1) fn main() {
_ = s;
}

View File

@ -525,6 +525,21 @@ crbug.com/1421045 [ nvidia-0x2184 ubuntu ] webgpu:api,validation,capability_chec
################################################################################
crbug.com/1424883 webgpu:api,operation,adapter,requestDevice:invalid: [ Failure ]
################################################################################
# maxBindingsPerBindGroup tests need to be updated for spec change
# KEEP
################################################################################
crbug.com/dawn/1767 webgpu:api,operation,adapter,requestDevice:default: [ Failure ]
crbug.com/dawn/1767 webgpu:api,operation,adapter,requestDevice:limit,worse_than_default:limit="maxBindingsPerBindGroup" [ Failure ]
crbug.com/dawn/1767 webgpu:api,operation,adapter,requestDevice:limits,supported:limit="maxBindingsPerBindGroup" [ Failure ]
crbug.com/dawn/1767 webgpu:api,validation,createBindGroupLayout:maximum_binding_limit: [ Failure ]
crbug.com/dawn/1767 [ linux ] webgpu:api,validation,capability_checks,limits,maxBindingsPerBindGroup:createBindGroupLayout,at_over:* [ Failure ]
crbug.com/dawn/1767 [ linux ] webgpu:api,validation,capability_checks,limits,maxBindingsPerBindGroup:createPipeline,at_over:* [ Failure ]
crbug.com/dawn/1767 [ mac ] webgpu:api,validation,capability_checks,limits,maxBindingsPerBindGroup:createBindGroupLayout,at_over:* [ Failure ]
crbug.com/dawn/1767 [ mac ] webgpu:api,validation,capability_checks,limits,maxBindingsPerBindGroup:createPipeline,at_over:* [ Failure ]
crbug.com/dawn/1767 [ win ] webgpu:api,validation,capability_checks,limits,maxBindingsPerBindGroup:createBindGroupLayout,at_over:* [ Failure ]
crbug.com/dawn/1767 [ win ] webgpu:api,validation,capability_checks,limits,maxBindingsPerBindGroup:createPipeline,at_over:* [ Failure ]
################################################################################
# untriaged failures
################################################################################