Allow index < limits.maxBindGroups in getBindGroupLayout()#5042
Allow index < limits.maxBindGroups in getBindGroupLayout()#5042kainino0x merged 6 commits intogpuweb:mainfrom
index < limits.maxBindGroups in getBindGroupLayout()#5042Conversation
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.
|
Previews, as seen when this build job started (f8a2c1c): |
|
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. |
kainino0x
left a comment
There was a problem hiding this comment.
LGTM % working group approval; this makes more sense to me, we shouldn't treat the end of the array differently from other holes.
|
The build errors are not related to this PR. @kainino0x PTAL, thanks! |
|
@Jiawei-Shao I created #5046 to address WGSL part of the build issues, thank you for pointing out the presence |
mwyrzykowski
left a comment
There was a problem hiding this comment.
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.
kainino0x
left a comment
There was a problem hiding this comment.
Approved in WG meeting. LGTM
Build is broken right now so I'll bypass those checks.
GPU Web WG 2025-01-22 Atlantic-time
|
This patch relaxes the check on the parameter
indexingetBindGroupLayout()by allowingindex < limits.maxBindGroupsinstead of only limitingindexmust be less than the array size of the bind group layouts used in the creation of the pipeline.