From: Henri Verbeet Subject: Re: [PATCH] wined3d: Refactor blend factor from DWORD to wined3d_color Message-Id: Date: Thu, 11 Oct 2018 17:23:14 +0330 In-Reply-To: References: <20181008224736.8111-1-mailszeros@gmail.com> <80962284-cdab-c690-45aa-5cc267d1aeb6@gmail.com> On Thu, 11 Oct 2018 at 04:52, DarkZeros wrote: > After having gone trough the code a second time. I think the cleanest way to tackle this is that: > - Keep D3D9 blend factor as is (if D3D9 and D3D11 functions will not be called on the same device, then this is safe) I think uniformity matters, and would prefer d3d9 to use the same interface as d3d11. > - Store the blend state, factor, and mask in "OMSetBlendState", and call "wined3d_device_set_blend_state" for storing the state, and emit the CS. > - In the exec of blend state invalidate the Blend state and blend factor, calling the appropiate calls. This makes sense since for D3D11 the call OMSetBlendState does all the state & factor & mask change atomically. > Sure.