On Mon Jan 30 23:52:35 2023 +0000, Francisco Casas wrote:
We require allocating variables across multiple register sets because some variables (in particular structs) can contain fields of different objects and numeric types, and we can't promote these fields into separated variables (well, at least before allocation), since allocation has a set of wonky rules that consider the variable as a whole (that the next patches try to address). For instance, in the following shader: https://shader-playground.timjones.io/fc9cdeee0e000008281a7d3f1c7d94b9 even if only one texture and one sampler are used, they bindings are `t5` and `s2` respectively. I recall attempting to separate variables by regset a couple of times without success, so there should also be other additional reasons that I cannot clearly remember.
Right, but above you also say that structs get split up into separate variables for sm5, and that putting object components into a struct is illegal for sm4. If we're going to split up the struct, that would seem to leave all uniform variables with a single register set, no?