On Tue Jan 24 17:00:41 2023 +0000, Francisco Casas wrote:
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.
Hmm, do we definitely want to split the variables? We don't have to split up the hlsl_ir_var just to write it as multiple variables in the RDEF section.
On the other hand, it lets a variable only have one regset. But if a variable can only have one regset, do we really need the bulk of this patch series?