On Mon Jan 23 19:32:28 2023 +0000, Zebediah Figura wrote:
What about structs and arrays?
Until later patches, structs and arrays are indeed expected to retrieve HLSL_REGSET_NUM.
The exception, which is introduced in latter patches, is for arrays (or multi-dimensional arrays) of objects, which have to have the same regset as their components.
Structs (or array of structs) that contain object components are only allowed in SM5, but SM5 also promotes each object component to a separated variable so, in that case, later patches make a new uniform for each object (or array, or multidimensiona-array of objects) and the original variable is only in charge of handling the numeric components, and thus should retrieve HLSL_REGSET_NUM.