Set the default value of maxInterStageShaderComponents to 32#2763
Closed
litherum wants to merge 1 commit intogpuweb:mainfrom
Closed
Set the default value of maxInterStageShaderComponents to 32#2763litherum wants to merge 1 commit intogpuweb:mainfrom
litherum wants to merge 1 commit intogpuweb:mainfrom
Conversation
This is a stop-gap measure until gpuweb#2749 is resolved. According to the Metal feature set tables, Macs limit the number of inter-stage inputs to 32 and the number of inter-stage components to 124 If we limit the number of components to anything higher than 32, then a program which uses single-component values will be able to exceed the limit on Macs.
Contributor
Contributor
Contributor
Author
|
That sounds fine to me, as long as we add rules about how to count them. |
Jiawei-Shao
added a commit
to Jiawei-Shao/gpuweb
that referenced
this pull request
May 10, 2022
This patch intends to clarify all the validations with
maxInterStageShaderComponents in WebGPU SPEC.
- The total amount of both user-defined and built-in vertex output
components should be no more than `maxInterStageShaderComponents`.
- If the primitive type is `point-list`, the The total amount of
both user-defined and built-in vertex output components should
be no more than (`maxInterStageShaderComponents - 1`) as on
Vulkan `PointSize` should always be declared and consume 1
component.
- The total amount of both user-defined and built-in fragment input
components should be no more than `maxInterStageShaderComponents`.
- The default value of `maxInterStageShaderComponents` should be 64.
- The `location` of each vertex output and fragment input variables
must be less than `maxInterStageShaderComponents / 4` as is required
by Vulkan SPEC.
You can read the discussions in gpuweb#1962 for more details.
fixes: gpuweb#1962, gpuweb#2763
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a stop-gap measure until #2749
is resolved. According to the Metal feature set tables, Macs limit the number
of inter-stage inputs to 32 and the number of inter-stage components to 124
If we limit the number of components to anything higher than 32, then a program
which uses single-component values will be able to exceed the limit on Macs.
Preview | Diff