8000 Pipeline error for out of bounds array with dynamic and offset by petermcneeleychromium · Pull Request #4384 · gpuweb/cts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Pipeline error for out of bounds array with dynamic and offset #4384

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

Conversation

petermcneeleychromium
Copy link
Contributor

Const indices are validated against array types for bounds checking even if there is a dynamic index dependency on the array expression.

For example

const q = array(array(14,2,3),array(1,7,3));

const o = 17;
fn compute() -> f32 {
  var a = 20;
  return f32(q[a][o]);
}

Will generate an out of bounds error (compile)
whereas currently we expect (but do not get) a pipeline error for


const q = array(array(14,2,3),array(1,7,3));

const o = 17;
fn compute() -> f32 {
  var a = 20;
  return f32(q[a][o]);
}

crbug.com/415298444

@@ -378,6 +378,45 @@ const kOutOfBoundsCases: Record<string, OutOfBoundsCase> = {
pipeline: true,
value: 1,
8000 },
override_array_dynamic_tested_oob_pos: {
Copy link
Contributor

Choose a reason for hiding this comment

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

What does "tested" signify in these case names?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tested is pretty vague. It should be type checked. As it is the type itself that has bounds.

@petermcneeleychromium petermcneeleychromium merged commit e5e17d8 into gpuweb:main May 5, 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.

2 participants
0