Compat: createBGL, createPipelineLayout, etc... #4121
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.
Refactor createBindGroupLayout, createPipelineLayout, vertex_state,correctness, and requestDevice tests for 0 storage buffers/textures in vertex/fragment stage.
Note: I needed to add
maxStorage(Buffers/Textures)In(Fragment/Vertex)Stage
tocapability_info.ts
. That had cascading effects which is why so many files are changed.For one, since these new limits are marked as optional, any place that uses limits has to check it's not undefined or least add a
!
to tell TS to stop complaining. I'm kind of wondering if we should change them to be required. They'll be required in the spec eventually, or at least that's the plan. In any case, this adds them.Another issue was the existing structure of
kPerStageBindingLimits
incapability_info.ts
. I refactored that to have per stage limits and addedgetBindingLimitsForBindingType
where you pass in the type you're using and the visibility and returns the limit for those stages.I also moved
getDefaultLimit/s
from GPUTestBase to LimitTestImpl as it seems like only the limits test should care about the default. All other tests should use what's on the device.