Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Jiawei-Shao
Copy link
Contributor

This patch relaxes the check on the parameter index in getBindGroupLayout() by allowing index < limits.maxBindGroups instead of only limiting index must be less than the array size of the bind group layouts used in the creation of the pipeline.

This patch relaxes the check on the parameter `index` in
`getBindGroupLayout()` by allowing `index < limits.maxBindGroups`
instead of only limiting `index` must be less than the array size
of the bind group layouts used in the creation of the pipeline.
Copy link
Contributor

Previews, as seen when this build job started (f8a2c1c):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

@Kangz
Copy link
Contributor

Kangz commented Jan 15, 2025

LGTM. @jimblandy @mwyrzykowski PTAL as well! This is a small improvement found while implementing the "empty BGLs are equivalent to null" in Dawn. Basically any BGL in the pipeline is fine to query, even once past what's specified in the pipeline layout, because it's as if they are null/empty.

Copy link
Contributor

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

LGTM % working group approval; this makes more sense to me, we shouldn't treat the end of the array differently from other holes.

@Jiawei-Shao
Copy link
Contributor Author

The build errors are not related to this PR.

@kainino0x PTAL, thanks!

@mehmetoguzderin
Copy link
Member

@Jiawei-Shao I created #5046 to address WGSL part of the build issues, thank you for pointing out the presence

Copy link

@mwyrzykowski mwyrzykowski left a comment

Choose a reason for hiding this comment

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

It's technically a breaking change but any site depending on such behavior seems quite unlikely.

Did we notice any CTS differences or sites which break due to this? I imagine not, I think this is fine.

Copy link
Contributor

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

Approved in WG meeting. LGTM

Build is broken right now so I'll bypass those checks.

@kainino0x kainino0x merged commit 369c9be into gpuweb:main Jan 23, 2025
2 of 4 checks passed
@kainino0x kainino0x added this to the Milestone 1 milestone Jan 23, 2025
@kainino0x kainino0x added api resolved Resolved - waiting for a change to the API specification api WebGPU API labels Jan 23, 2025
@Kangz
Copy link
Contributor

Kangz commented Jan 27, 2025

GPU Web WG 2025-01-22 Atlantic-time
  • KN: Rather than treating the array of bindgroups as something that can both contain nulls and has a length less than limits.maxBindGroups, this makes it act like it is always an array of length limits.maxBindGroups that may contain nulls.
  • MW: This change seems fine, ever-so-slightly breaking, but the likelihood of anyone relying on this is practically zero. Not opposed if there’s agreement to move forward.
  • KN: To clarify: the “breaking change” is just that, if you were catching the error before, you won’t get it thrown any more
  • KG: Mozilla is fine with this.
  • RESOLVED: Let’s move forward with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api resolved Resolved - waiting for a change to the API specification api WebGPU API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants