On 2/12/20 13:43, Henri Verbeet wrote:
On Wed, 12 Feb 2020 at 13:23, Paul Gofman gofmanp@gmail.com wrote:
After a bit of more testing I found out that state blocks favour ATOC state. So it is no straightforward way to deal with it in d3d9 unless we want to add blend object to wined3d state block. The other solution I can think of is to handle ATOC states in wined3d_stateblock_set_render_state(). That is, to introduce an internal blend state object in wined3d_stateblock, update it from wined3d_stateblock_set_render_state() if necessary, and apply STATE_BLEND on state block application.
I think that's more or less what we want eventually. I.e., the idea is that most render states and the like will eventually go away from core wined3d, and will be replaced with d3d10/11 style state objects.
So maybe then I introduce wined3d_stateblock_set_blend_state() for now, manage D3DRS_BLENDFACTOR in d3d9 (if I am not missing something this state is d3d9 only) and remove WINED3D_RS_BLENDFACTOR handling from wined3d? I suppose on top of this managing ATOC from d3d9 should be trivial.