Skip to content

Conversation

@Richard-Yunchao
Copy link

@Richard-Yunchao Richard-Yunchao commented Jan 5, 2021

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

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.
@Richard-Yunchao
Copy link
Author

See the investigation at #1327. Please add more reviewers if needed.

Copy link
Contributor

@kvark kvark left a 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"}}
Copy link
Contributor

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 ..."

Copy link
Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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"}}.

Copy link
Author

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.

Copy link
Contributor

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2021

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

Copy link
Contributor

@kvark kvark left a 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!

@kvark kvark merged commit 966c43a into gpuweb:main Jan 11, 2021
bors bot added a commit to gfx-rs/wgpu that referenced this pull request Mar 2, 2021
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]>
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
This PR adds unimplemented stubs for the `refract` builtin.

Issue: gpuweb#1234
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