Skip to content

Replace GPULimits with GPUAdapterLimits and record<> - #1312

Merged
kainino0x merged 1 commit into
gpuweb:mainfrom
kainino0x:gpuadapterlimits2
Dec 17, 2020
Merged

kainino0x merged 1 commit into
gpuweb:mainfrom
kainino0x:gpuadapterlimits2

Conversation

@kainino0x

@kainino0x kainino0x commented Dec 15, 2020 •

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Previews, as seen at the time of posting this comment:
WebGPU | IDL
WGSL
83ed798

Comment thread spec/index.bs Resolved
Comment thread spec/index.bs
The default is used if a value is not explicitly specified in {{GPUDeviceDescriptor/limits}}.

<table class="data no-colspan-center" dfn-type=dict-member dfn-for=GPULimits>
<table class="data no-colspan-center" dfn-type=attribute dfn-for="supported limits">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally, the limits structure is still technically duplicated between this [=supported limits=] and {{GPUAdapterLimits}}, but it doesn't end up taking any more room in the spec. (Except note we now have no definitions for the members of GPUAdapterLimits; we might want to link them in here? Alternatively, we can use GPUAdapterLimits (rename to GPUSupportedLimits) everywhere instead of [=supported limits=].)

Comment thread spec/index.bs
dictionary GPUDeviceDescriptor : GPUObjectDescriptorBase {
sequence<GPUFeatureName> features = [];
GPULimits limits = {};
record<DOMString, GPUSize32> limits = {};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not all limits will be u32 though. Maybe this should be Number?

@kainino0x kainino0x Dec 16, 2020 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the comment, we can change this later by changing it to double or any and writing out the type conversions explicitly for each limit. It's easier to have this now so we don't have to write that now.

Comment thread spec/index.bs Resolved
Comment thread spec/index.bs Resolved
@kainino0x
kainino0x marked this pull request as ready for review December 17, 2020 21:50
@kainino0x
kainino0x merged commit 7babed6 into gpuweb:main Dec 17, 2020
@kainino0x
kainino0x deleted the gpuadapterlimits2 branch December 17, 2020 22:04
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
This PR adds unimplemented stub tests for the `acosh` builtin.

Issue: gpuweb#1221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants