Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

JusSn
Copy link
Contributor

@JusSn JusSn commented Oct 30, 2019

This explainer will track the rationale behind each WebGPU limit. All queryable restrictions should have a corresponding reason in this doc.

Edit: Rendered

Kangz and others added 7 commits August 26, 2019 16:12
In shaders there are several texture types for each dimensionality
depending on their component type. It can be either float, uint or
sint, with maybe in the future depth/stencil if WebGPU allows reading
such textures.

The component type of a GPUTextureView's format must match the
component type of its binding in the shader module. This is for
several reasons:

 - Vulkan requires the following: "The Sampled Type of an
OpTypeImage declaration must match the numeric format of the
corresponding resource in type and signedness, as shown in the
SPIR-V Sampled Type column of the Interpretation of Numeric Format
table, or the values obtained by reading or sampling from this image
are undefined."

 - It is also required in OpenGL for the texture units to be complete,
a uint or sint texture unit used with a non-nearest sampler is
incomplete and returns black texels.

Similar constraints must exist in other APIs.

To encode this compatibility constraint, a new member is added to
GPUBindGroupLayoutBinding that is a new enum GPUTextureComponentType
that give the component type of the texture.
This is the most common case and avoids having an optional dictionary
member with no default value (but that still requires a value for
texture bindings).
@JusSn JusSn requested review from kainino0x, Kangz and kvark October 30, 2019 00:22
@JusSn
Copy link
Contributor Author

JusSn commented Oct 30, 2019

Part of #483

Copy link
Contributor

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

Looks great. Thank you for keeping this well tracked - the issue links are helpful!

design/Limits.md Outdated

Limit | API Doc | gpuweb issue/PR
--- | --- | ---
`maxBindGroups = 4;` | [Vulkan](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#limits-minmax) `maxBoundDescriptorSets` |
Copy link
Contributor

Choose a reason for hiding this comment

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

unfortunate that Vulkan spec is so heavy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it would at least redirect to the specific section. :(

Copy link
Contributor

Choose a reason for hiding this comment

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

It does for me, if I don't touch it while it's loading.

How about the LunarG chunked version?
https://vulkan.lunarg.com/doc/view/latest/linux/chunked_spec/chap36.html#limits-minmax

Copy link
Contributor

Choose a reason for hiding this comment

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

design/Limits.md Outdated
Limit | API Doc | gpuweb issue/PR
--- | --- | ---
`maxBindGroups = 4;` | [Vulkan](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#limits-minmax) `maxBoundDescriptorSets` |
`maxDynamicUniformBuffersPerPipelineLayout = 8;` | [Vulkan](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#limits-minmax) `maxDescriptorSetUniformBuffersDynamic` | [#406](https://github.com/gpuweb/gpuweb/issues/406)
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, a bit strange to see all of the links pointing to Vulkan

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense considering Vulkan's lower-end Android hardware support. But the theory is that future limits won't be decided by Vulkan

Co-Authored-By: Kai Ninomiya <[email protected]>
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.

please link to the chunked spec as @kainino0x suggested!
In the future, we'll need to get a good sense on what the internal needs are for the implementations, which could affect the exposed limits.

@JusSn JusSn merged commit f720b5c into gpuweb:master Nov 4, 2019
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
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.

4 participants