Skip to content

Conversation

@shaoboyan091
Copy link
Contributor

@shaoboyan091 shaoboyan091 commented Jan 21, 2026

Add cases to validate immediate size checks during both compute and render pipeline creation.

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 264b3a4):

+webgpu:api,validation,compute_pipeline:pipeline_creation_immediate_size_mismatch:* - 12 cases, 12 subcases (~1/case)
-webgpu:api,validation,render_pipeline,misc:external_texture:* - 1 cases, 1 subcases (~1/case)
+webgpu:api,validation,render_pipeline,misc:external_texture:* - 2 cases, 2 subcases (~1/case)
+webgpu:api,validation,render_pipeline,misc:pipeline_creation_immediate_size_mismatch:* - 18 cases, 18 subcases (~1/case)
-TOTAL: 285993 cases, 2344970 subcases
+TOTAL: 286024 cases, 2345001 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 test cases for immediate data size checks during pipeline creation. The tests verify that pipeline creation fails when shaders use immediate data larger than the immediateSize specified in the pipeline layout or larger than maxImmediateSize when using automatic layout.

Changes:

  • Added helper function supportsImmediateData to check browser support for immediate data
  • Added pipeline_creation_immediate_size_mismatch test for compute pipelines
  • Added pipeline_creation_immediate_size_mismatch test for render pipelines

Reviewed changes

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

File Description
src/common/util/util.ts Added supportsImmediateData helper function to detect immediate data feature support
src/webgpu/api/validation/compute_pipeline.spec.ts Added test to validate immediate size checks during compute pipeline creation
src/webgpu/api/validation/render_pipeline/misc.spec.ts Added test to validate immediate size checks during render pipeline creation

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

@shaoboyan091 shaoboyan091 force-pushed the immediate-pipeline-creation branch from cf15532 to 2127eae Compare January 21, 2026 03:19
@shaoboyan091 shaoboyan091 force-pushed the immediate-pipeline-creation branch 2 times, most recently from ab59c0d to 7edddc0 Compare February 9, 2026 07:03
@shaoboyan091 shaoboyan091 requested a review from Copilot February 9, 2026 07:05
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 2 out of 3 changed files in this pull request and generated 4 comments.


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

Add cases to validate immediate size checks during both compute and
render pipeline creation.
@shaoboyan091 shaoboyan091 force-pushed the immediate-pipeline-creation branch from 7edddc0 to 438463e Compare February 9, 2026 08:37
@kainino0x
Copy link
Collaborator

@shaoboyan091 sorry I've been slow at picking up these re-reviews. To make it a bit easier could you please "resolve" any copilot review comments before sending for review? (either by addressing them or by ignoring them)

Having them open makes it harder to review the PR, but I've also noticed that it generates some useful suggestions so I don't want to necessarily ignore them either.

@shaoboyan091
Copy link
Contributor Author

@kainino0x Sure, will do. Thanks!

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