-
Notifications
You must be signed in to change notification settings - Fork 353
Add texture dimension limits #1328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Texture size (width, height, depth) has limits according to its type (1D, 2D, 3D, or 1D/2D Array, etc.). This change adds texture dimension limits on GPUAdapterLimits.
|
See the investigation at #1327. Please add more reviewers if needed. |
kvark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
spec/index.bs
Outdated
| <td>{{GPUSize32}} <td>Higher <td>4096 | ||
| <tr class=row-continuation><td colspan=4> | ||
| The maximum allowed {{GPUTextureDescriptor/size}}.{{GPUExtent3DDict/width}} | ||
| for which the {{GPUTextureDescriptor/dimension}} is {{GPUTextureDimension/"1d"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"for which" confuses me a great deal here. Could this be reworded? Something like "for textures created with ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"for textures created with ... is ..." seems not good. And It is tailed with "when creating a GPUTexture", should I remove this clause because it is duplicated?
BTW, Descriptions for other parameters is using "for which ... is ... when ... ". I removed "the" though. Or maybe we can say "for whose ... is ... when ..."? I am not a native English speaker. I am really open-minded for your suggestions about better wording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to be tailed with "when creating a GPUTexture", I assumed we'll remove this part in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should say, e.g. for maxTextureDimension2D:
The maximum allowed value for the {{GPUTextureDescriptor/size}}.[=GPUExtent3D/width=} and {{GPUTextureDescriptor/size}}.[=GPUExtent3D/height=] of a [=texture=] with {{GPUTextureDescriptor/dimension}} {{GPUTextureDimension/"2d"}}.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I followed Kai's suggestion, with slight revision " ... a [=texture=] created with ..." as Dzmitry suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK either way, but I didn't think it was necessary. The dimension of a texture is always the one it was created with. Also, the texture hasn't been created yet (this validation occurs inside createTexture) so if you want to say "create" it should be
The maximum allowed value for descriptor.size.width and descriptor.size.height when creating a texture with descriptor.dimension "2d".
or something but I think that's needlessly verbose.
kvark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like my concerns are addressed. Thank you!
1241: Update Extent3d::depth and Limits to latest upstream r=grovesNL a=kvark **Connections** - gpuweb/gpuweb#1390 - gpuweb/gpuweb#1328 - gpuweb/gpuweb#1163 - gpuweb/gpuweb#1274 **Description** Just an API update up to spec. **Testing** Tested on wgpu-rs examples Co-authored-by: Dzmitry Malyshau <[email protected]>
This PR adds unimplemented stubs for the `refract` builtin. Issue: gpuweb#1234
Texture size (width, height, depth) has limits according to its
type (1D, 2D, 3D, or 1D/2D Array, etc.). This change adds texture
dimension limits on GPUAdapterLimits.
Preview | Diff