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. |
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.
"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.
"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.
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.
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.
Hmm, I followed Kai's suggestion, with slight revision " ... a [=texture=] created with ..." as Dzmitry suggested.
There was a problem hiding this comment.
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.
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