mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 09:55:26 +00:00
Add missing WebGPU limits to Constants.h
This will help check that the Vulkan devices are enough for WebGPU in a following CL. In addition to additional limits this CL: - Change maxColorAttachments 4 -> 8 to match WebGPU - Renames kMinDynamicBufferOffsetAlignment to kMinUniformBufferOffsetAlignment. - Renames kMaxVertexBufferStride to kMaxVertexBufferArrayStride. - Changes validation of buffer offsets to use the separate uniform and storage limits (but no test is added because they are the same). - Adds validation and a test for kMaxStorageBufferBindingSize. - Augment the null::Device memory limit for that new test (it allocates a buffer of 512MB). - Fix the maxColorAttachment test to not use hardcoded values. Bug: dawn:796 Change-Id: Ibe4219130a44355ae91c02aaa0a41cf5d9f9e234 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56081 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
895bc934bb
commit
73b7cd624f
@@ -20,26 +20,31 @@
|
||||
static constexpr uint32_t kMaxBindGroups = 4u;
|
||||
static constexpr uint8_t kMaxVertexAttributes = 16u;
|
||||
static constexpr uint8_t kMaxVertexBuffers = 8u;
|
||||
static constexpr uint32_t kMaxVertexBufferStride = 2048u;
|
||||
static constexpr uint32_t kMaxVertexBufferArrayStride = 2048u;
|
||||
static constexpr uint32_t kNumStages = 3;
|
||||
static constexpr uint8_t kMaxColorAttachments = 4u;
|
||||
static constexpr uint8_t kMaxColorAttachments = 8u;
|
||||
static constexpr uint32_t kTextureBytesPerRowAlignment = 256u;
|
||||
// Dynamic buffer offsets require offset to be divisible by 256
|
||||
static constexpr uint64_t kMinDynamicBufferOffsetAlignment = 256u;
|
||||
static constexpr uint32_t kMaxInterStageShaderComponents = 60u;
|
||||
static constexpr uint32_t kMaxComputeWorkgroupStorageSize = 16352u;
|
||||
static constexpr uint32_t kMaxComputeWorkgroupInvocations = 256u;
|
||||
static constexpr uint32_t kMaxComputePerDimensionDispatchSize = 65535u;
|
||||
|
||||
// Per stage limits
|
||||
static constexpr uint32_t kMaxSampledTexturesPerShaderStage = 16;
|
||||
static constexpr uint32_t kMaxSamplersPerShaderStage = 16;
|
||||
static constexpr uint32_t kMaxStorageBuffersPerShaderStage = 8;
|
||||
static constexpr uint32_t kMaxStorageTexturesPerShaderStage = 8;
|
||||
static constexpr uint32_t kMaxStorageTexturesPerShaderStage = 4;
|
||||
static constexpr uint32_t kMaxUniformBuffersPerShaderStage = 12;
|
||||
|
||||
// Per pipeline layout limits
|
||||
static constexpr uint32_t kMaxDynamicUniformBuffersPerPipelineLayout = 8u;
|
||||
static constexpr uint32_t kMaxDynamicStorageBuffersPerPipelineLayout = 4u;
|
||||
|
||||
// Max size of uniform buffer binding
|
||||
// Buffer binding constraints
|
||||
static constexpr uint64_t kMaxUniformBufferBindingSize = 16384u;
|
||||
static constexpr uint64_t kMaxStorageBufferBindingSize = 134217728u;
|
||||
static constexpr uint64_t kMinUniformBufferOffsetAlignment = 256u;
|
||||
static constexpr uint64_t kMinStorageBufferOffsetAlignment = 256u;
|
||||
|
||||
// Indirect command sizes
|
||||
static constexpr uint64_t kDispatchIndirectSize = 3 * sizeof(uint32_t);
|
||||
|
||||
Reference in New Issue
Block a user