wined3d: Check the writemask before activating the oC0 optimization.

The comment above the code correctly mentions that this optimization
does not work if oC0 is written partially, but the code doesn't
actually check for this condition.
This commit is contained in:
Stefan Dösinger 2010-07-20 21:29:54 +02:00 committed by Alexandre Julliard
parent 6b794cbd64
commit 068915a4f1
1 changed files with 2 additions and 1 deletions

View File

@ -661,7 +661,8 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct
* COLOROUT 0 is overwritten partially later, the marker is dropped again. */
ps->color0_mov = FALSE;
if (ins.handler_idx == WINED3DSIH_MOV)
if (ins.handler_idx == WINED3DSIH_MOV
&& dst_param.write_mask == WINED3DSP_WRITEMASK_ALL)
{
/* Used later when the source register is read. */
color0_mov = TRUE;