Skip to content

Conversation

@shaoboyan091
Copy link
Contributor

@shaoboyan091 shaoboyan091 commented Jan 21, 2026

immediateSize attribute is used for pipeline layout creation. It requires immediateSize must be a multiple of 4 and immediateSize must be smaller or equal to maxImmediateSize.

Issue: #


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located.
  • Test descriptions are accurate and complete.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Tests avoid over-parameterization (see case count report).

When landing this PR, be sure to make any necessary issue status updates.

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

Results for build job (at 6324694):

+webgpu:api,validation,createPipelineLayout:immediate_data_size:* - 8 cases, 8 subcases (~1/case)
-TOTAL: 286009 cases, 2344986 subcases
+TOTAL: 286017 cases, 2344994 subcases

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds validation tests for the experimental immediateSize attribute used in pipeline layout creation. The tests verify that immediateSize must be a multiple of 4 and must not exceed device.limits.maxImmediateSize.

Changes:

  • Added a new test immediate_data_size to validate immediateSize parameter constraints
  • Added supportsImmediateData helper function to check for immediate data support

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/webgpu/api/validation/createPipelineLayout.spec.ts Added validation test for immediateSize parameter with edge case coverage including valid/invalid multiples of 4 and boundary values
src/common/util/util.ts Added supportsImmediateData helper function to detect immediate data feature support through prototype and language feature checks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shaoboyan091 shaoboyan091 force-pushed the immediate-layout-creation branch 2 times, most recently from 42d8647 to 33dc628 Compare February 10, 2026 03:26
immediateSize attribute is used for pipeline layout creation. It requires
immediateSize must be a multiple of 4 and immediateSize must be smaller
or equal to maxImmediateSize.
@shaoboyan091 shaoboyan091 force-pushed the immediate-layout-creation branch from 33dc628 to fe6a4f3 Compare February 10, 2026 03:39
@shaoboyan091
Copy link
Contributor Author

This test case caught a validation issue in Dawn which doesn't check alignment during pipeline layout creation.

@kainino0x kainino0x enabled auto-merge (squash) February 12, 2026 00:51
@kainino0x kainino0x merged commit dbe37c7 into gpuweb:main Feb 12, 2026
1 check passed
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.

2 participants