Repository navigation
Update GPUAdapterLimits to GPUSupportedLimits - #1765
Conversation
I thought of two arguments for what to choose here:
This eliminates the other two options, so I think clamping is best (despite the slightly spooky behavior). |
kainino0x
left a comment
There was a problem hiding this comment.
This reminds me we can consider merging the definitions of [=supported limits=] and {{GPUSupportedLimits}}: #1312 (comment)
|
|
||
| <div class=validusage> | ||
| - Each key in |descriptor|.{{GPUDeviceDescriptor/nonGuaranteedLimits}} | ||
| must be the name of a member of [=supported limits=]. |
There was a problem hiding this comment.
Reclassifying this as an OperationError was suggested by @kainino0x in the review of this Chrome change:
Hm... the spec as I wrote it requires a TypeError here, but it occurs to me an OperationError might be better to match the behavior between "limit not known" and "limit higher than supported", because probably the former can be considered a special case of the latter....
This patch mirrors the current discussions in the spec (gpuweb/gpuweb#1765). Bug: 1212868 Change-Id: I34a46712778449f020a05695d9a9a1ab03e049ec Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2915661 Commit-Queue: Brandon Jones <[email protected]> Reviewed-by: Kai Ninomiya <[email protected]> Reviewed-by: Corentin Wallez <[email protected]> Cr-Commit-Position: refs/heads/master@{#887327}
Previously the
GPUDevicehad alimitsattribute that was of typeobject, but there doesn't seem to be any reason why it can't share an interface with theGPUAdapter's limits. To reflect that shared use that interface gets renamed toGPUSupportedLimitslike theGPUSupportedFeaturesbefore it.Additionally, there's been some discussion about what should happen when the user defines limits that are worse than the default limits. This change adds some logic to clamp them to the default value, but we shouldn't land it till we agree on what should happen. I just wanted to demonstrate how one approach to that problem could work.
Preview | Diff