Skip to content

const_array_elements limit test: split into MAX, MAX/8, MAX/64 cases - #4497

Merged
dneto0 merged 1 commit into
gpuweb:mainfrom
dneto0:issue-4496
Nov 7, 2025
Merged

dneto0 merged 1 commit into
gpuweb:mainfrom
dneto0:issue-4496

Conversation

@dneto0

@dneto0 dneto0 commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

The MAX const array size is 2047.

The driver compiler can take a long time compiling the MAX case. For example a laptop with an Intel Gen12 LP GPU with the Mesa driver can take 28s to compile the shader. This exceeds Chrome's GPU watchdog timeout (10s) and the test will fail.

Instead of completely disabling the test, split it into cases for MAX, MAX/8, and MAX/64 elements. This lets us skip the very largest cases, but still attempt smaller bug significant array sizes. That lets us get some signal that the large-ish const arrays are viable.

The additional runtime for the new cases are insignificant compared to the full case.

Fixed: #4496

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 in the test tree.
  • Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Helpers and types promote readability and maintainability.

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

The MAX const array size is 2047.

The driver compiler can take a long time compiling the MAX case.
For example a laptop with an Intel Gen12 LP GPU with the Mesa
driver can take 28s to compile the shader.  This exceeds Chrome's GPU
watchdog timeout (10s) and the test will fail.

Instead of completely disabling the test, split it into cases
for MAX, MAX/8, and MAX/64 elements.  This lets us skip the very
largest cases, but still attempt smaller bug significant array
sizes. That lets us get some signal that the large-ish const
arrays are viable.

The additional runtime for the new cases are insignificant
compared to the full case.

Fixed: gpuweb#4496

@petermcneeleychromium petermcneeleychromium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks great.

@dneto0
dneto0 merged commit bd0414c into gpuweb:main Nov 7, 2025
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.

webgpu:shader,execution,limits,const_array_elements test can timeout in the backend driver compiler: split into MAX, MAX/8, MAX/64 cases

2 participants