Module: wine Branch: master Commit: 068915a4f128985b0092bd0874f34cf9c88260b1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=068915a4f128985b0092bd0874...
Author: Stefan Dösinger stefan@codeweavers.com Date: Tue Jul 20 21:29:54 2010 +0200
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.
---
dlls/wined3d/shader.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 66a81fb..209bae4 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -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;