Well, the number of sampler stages (and thus the number of sampler stage states) for example is dependant on hardware limits, so you can't really use the "#define STATE_SAMPLER(b, a) STATE_RENDER(WINEHIGHEST_RENDER_STATE + WINEHIGHEST_SAMPLER_STATE * b + a)" macro since WINEHIGHEST_SAMPLER_STATE would be non-constant.