Add maxInterStageShaderVariables Limits

Will statically report the base limit of 16 for now. Important to note
that this is not validated properly within Tint at this point, and the
current constant associated with this limit is actually 15.

Bug: dawn:1448
Change-Id: I74a5815cc34439ccc3b6ff9cd0afbc56590148fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94661
Commit-Queue: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Brandon Jones 2022-06-24 17:30:29 +00:00 committed by Dawn LUCI CQ
parent c5f7e8f0bc
commit 431c7a4f66
5 changed files with 14 additions and 2 deletions

View File

@ -1237,6 +1237,7 @@
{"name": "max vertex attributes", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
{"name": "max vertex buffer array stride", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
{"name": "max inter stage shader components", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
{"name": "max inter stage shader variables", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
{"name": "max color attachments", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
{"name": "max compute workgroup storage size", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
{"name": "max compute invocations per workgroup", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},

View File

@ -51,6 +51,7 @@
X(Maximum, maxVertexAttributes, 16, 16) \
X(Maximum, maxVertexBufferArrayStride, 2048, 2048) \
X(Maximum, maxInterStageShaderComponents, 60, 60) \
X(Maximum, maxInterStageShaderVariables, 16, 16) \
X(Maximum, maxColorAttachments, 8, 8) \
X(Maximum, maxComputeInvocationsPerWorkgroup, 256, 256) \
X(Maximum, maxComputeWorkgroupSizeX, 256, 256) \

View File

@ -301,11 +301,14 @@ MaybeError Adapter::InitializeSupportedLimitsImpl(CombinedLimits* limits) {
// D3D12 has no documented limit on the size of a storage buffer binding.
limits->v1.maxStorageBufferBindingSize = 4294967295;
// Using base limits for:
// TODO(crbug.com/dawn/685):
// LIMITS NOT SET:
// - maxInterStageShaderComponents
// - maxVertexBufferArrayStride
// TODO(crbug.com/dawn/1448):
// - maxInterStageShaderVariables
return {};
}

View File

@ -619,11 +619,14 @@ class Adapter : public AdapterBase {
limits->v1.maxUniformBufferBindingSize = maxBufferSize;
limits->v1.maxStorageBufferBindingSize = maxBufferSize;
// TODO(crbug.com/dawn/685):
// Using base limits for:
// TODO(crbug.com/dawn/685):
// - maxBindGroups
// - maxVertexBufferArrayStride
// TODO(crbug.com/dawn/1448):
// - maxInterStageShaderVariables
return {};
}

View File

@ -339,6 +339,10 @@ MaybeError Adapter::InitializeSupportedLimitsImpl(CombinedLimits* limits) {
}
}
// Using base limits for:
// TODO(crbug.com/dawn/1448):
// - maxInterStageShaderVariables
return {};
}