Henri Verbeet wrote:
Tex fixup parameter for tex1 would have idx 0, the one for tex3 would have idx 1. These would then be packed as PsamplerNP2Fixup0.xy and PsamplerNP2Fixup0.zw.
OK, forget that as well.
Like I replied to Stefan about the uchar thing: The code is only active for FX cards which have a constant limit of 256. (or it could become active for cards below a FX)
With the approach without swz, this would mean changing the unsigned char array to a unsigned short one, which would double the size.
I tried to keep the whole struct as small as possible, the current size if now 20 bytes (16 bytes for the indices, and 4 bytes for swz and num_consts).
Adding the code for ARB would introduce 2 additional bytes (active bitflag, since we can figure out quite well if there are still enough free constants in ARB), but that's it.
Performancewise the current approach shouldn't be a problem. I think we should focus on size here, and that's why I don't think changing this will do any good.