-
Notifications
You must be signed in to change notification settings - Fork 353
Closed
Milestone
Description
WebGPU has a small amount of limits defined in the spec and we should add a LOT more to be complete. As a first pass I took a look at the VkPhysicalDeviceLimits Vulkan limits descriptor to see what we're obviously missing. After filtering for limits WebGPU already has, or that are inapplicable, we have the following missing limits. (all member names below are the name of members in VkPhysicalDeviceLimits)
- Additional binding model limits
- per-
GPUBindGroupLayoutlimits in the number of resources. We can decide that they are not applicable after looking at the guarantees in Vulkan.maxDescriptorSetSamplers,maxDescriptorSetSamplers,maxDescriptorSetUniformBuffersDynamic,maxDescriptorSetStorageBuffers,maxDescriptorSetStorageBuffersDynamic,maxDescriptorSetSampledImages,maxDescriptorSetStorageImages - per-stage limit on the number of resources:
maxPerStageResources. We can decide it is not applicable.
- per-
-
minUniformBufferOffsetAlignment,minStorageBufferOffsetAlignment - Limits for fragment outputs / render targets
-
maxFramebufferWidth,maxFramebufferHeight. We can decide to not have it and usemaxTextureDimension2Dinstead. -
maxColorAttachments- currently hardcoded at 8, needs a limit -
framebufferColorSampleCounts,framebufferDepthSampleCounts,framebufferStencilSampleCounts,framebufferNoAttachmentsSampleCountsdepending on what we decide for multisampling limits. -
maxFragmentOutputAttachments,maxFragmentDualSrcAttachments,maxFragmentCombinedOutputResourcesif we want to have them, or just usemaxColorAttachmentsor not.
-
-
maxVertexOutputComponentsandmaxFragmentInputComponents -
maxComputeSharedMemorySize,maxComputeWorkGroupCount,maxComputeWorkGroupInvocations,maxComputeWorkGroupSize -
minTexelOffset,maxTexelOffset,minTexelGatherOffset,maxTexelGatherOffsetwhich define the valid range for the compile-time constant offset for some texture WGSL functions. -
maxClipDistances,maxCullDistances,maxCombinedClipAndCullDistancesif we have the equivalent ofgl_ClipPlaneand friends in WGSL. -
maxVertexInputAttributeOffsetif it is not justmaxVertexInputBufferStride -
maxDrawIndexedIndexValue- not needed -
maxDrawIndirectCount - Information about the system if we want to expose it:
-
subPixelPrecisionBits,subTexelPrecisionBits,viewportSubPixelBits,mipmapPrecisionBits -
maxSamplerLodBiasthat clamps the sum of the sampler's lod bias and the bias set in the shader. -
strictLineswhich describes wether parallelogram lines or Bresenham lines are used. -
standardSampleLocationswhich we might require in WebGPU.
-
- More multisampled limits depending one the multisample limits discussion
-
sampledImageColorSampleCounts,sampledImageIntegerSampleCounts,sampledImageDepthSampleCounts,sampledImageStencilSampleCounts,storageImageSampleCounts -
maxSampleMaskWords
-
I think we also want a limit that's WebGPU-specific:
-
maxBufferTextureCopyRowPitchAlignmentthat encodes the 256 constraint we have.
kvark
Metadata
Metadata
Assignees
Labels
No labels