Vulkan: Check for required limits when initializing adapters

Also adds the new limits for maxComputeWorkgroupSize because there are
few systems where the .Z of that limit goes above 64.

Bug: dawn:796
Change-Id: I52e85e7b7c666da15493178e170ca82922d34017
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56082
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Corentin Wallez
2021-07-03 04:30:56 +00:00
committed by Dawn LUCI CQ
parent 14d4a3b729
commit fc37b32c55
2 changed files with 132 additions and 0 deletions

View File

@@ -25,9 +25,14 @@ static constexpr uint32_t kNumStages = 3;
static constexpr uint8_t kMaxColorAttachments = 8u;
static constexpr uint32_t kTextureBytesPerRowAlignment = 256u;
static constexpr uint32_t kMaxInterStageShaderComponents = 60u;
// Compute constants
static constexpr uint32_t kMaxComputeWorkgroupStorageSize = 16352u;
static constexpr uint32_t kMaxComputeWorkgroupInvocations = 256u;
static constexpr uint32_t kMaxComputePerDimensionDispatchSize = 65535u;
static constexpr uint32_t kMaxComputeWorkgroupSizeX = 256;
static constexpr uint32_t kMaxComputeWorkgroupSizeY = 256;
static constexpr uint32_t kMaxComputeWorkgroupSizeZ = 64;
// Per stage limits
static constexpr uint32_t kMaxSampledTexturesPerShaderStage = 16;