Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compat: createBGL, createPipelineLayout, etc... #4121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

greggman
Copy link
Contributor

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 to capability_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 in capability_info.ts. I refactored that to have per stage limits and added getBindingLimitsForBindingType 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.

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`
to `capability_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` in
`capability_info.ts`. I refactored that to have per stage limits and
added `getBindingLimitsForBindingType` 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.
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.

1 participant