Commit 068915a4 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

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.
parent 6b794cbd
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment