On Fri Apr 14 00:45:45 2023 +0000, Zebediah Figura wrote:
I can't remember offhand if we have a test for this, but is this supposed to be the used count or the register size?
Yep, it is supposed to be `count`.
The purpose of `count` is indeed to keep track of how many registers the variable actually needs to allocate, which may be less than the register size.
If the resource has a register reservation, `count` should be the register size. If the resource is not used at all, `count` should be zero. If only some elements are used, sampler arrays only allocate until the last used one, while texture arrays allocate all.
I have some tests along the line for patches after these ones, but perhaps some are missing at this stage. I added a couple of simple tests for texture arrays in object-parameters.shader_test .