On 19 April 2013 17:39, Stefan Dösinger stefandoesinger@gmail.com wrote:
The tricky bit is the lowest_disabled_stage because we have two pieces of code that use it. One is wined3d_device_set_texture_stage_state, which uses it to find nop state changes. The other one are the state application function and device_map_fixed_function_samplers. The state seems like the best place for this, as both the device and command stream have a copy of the state where they can keep their version of this value up to date.
It may be ok to just keep that in wined3d_state. I'm not sure wined3d_device_set_texture_stage_state() would really need to touch it though. While you could in theory avoid submitting state changes above lowest_disabled_stage through the CS, I'm not sure it would really gain you anything, and it could very well be more complicated than just submitting those, and only using lowest_disabled_stage on the CS side to avoid dirtifying states.