You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following #1721, there is an issue uncovered that making the binding numbers implicit would effectively require all the implementations to do binding re-mapping. This re-mapping can only be done at pipeline creation time, and thus precludes creating SPIR-V shader modules earlier.
Thinking about a compromise, we could say that binding numbers are limited to 65535 (similar to the overridable constant indices). This should allow a non-remapping implementation to reason about binding numbers at shader module creation time.
This seems fine, as in it helps your implementation and doesn't lose developer flexiblity. (and we can reduce some u32 to u16 in implementations too :))
There are still details to be figured out, like what binding indices would be assigned. Maybe if the external texture binding is x, then the associated textures would be x + 0x10000, x + 0x20000, etc. Seems doable, but we'll probably have to keep u32 :)
Resolution: accept. Easy to lift the restriction later if it ultimately turns out not to be necessary. Firefox to see whether it turns out to be unnecessary (e.g. because passing sparse layouts to the driver turns out to be slow).
Activity
Kangz commentedon May 31, 2021
This seems fine, as in it helps your implementation and doesn't lose developer flexiblity. (and we can reduce some u32 to u16 in implementations too :))
kvark commentedon May 31, 2021
There are still details to be figured out, like what binding indices would be assigned. Maybe if the external texture binding is
x, then the associated textures would bex + 0x10000,x + 0x20000, etc. Seems doable, but we'll probably have to keepu32:)kainino0x commentedon Jun 7, 2021
Resolution: accept. Easy to lift the restriction later if it ultimately turns out not to be necessary. Firefox to see whether it turns out to be unnecessary (e.g. because passing sparse layouts to the driver turns out to be slow).
Kangz commentedon Aug 20, 2021
This restriction hasn't been added in the spec yet, and the WGSL spec still says "non-negative i32 literal".
Limits binding numbers to 65535
Limits binding numbers to 65535 (#2286)
Refactor binary arithmetic tests to use common test values (gpuweb#1783)