=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Use finer grained colorkey state invalidation.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Apr 15 08:43:26 CDT 2015
Module: wine
Branch: master
Commit: 483d9550c49a0b6fc5cebe916ebfd07f415c35ac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=483d9550c49a0b6fc5cebe916ebfd07f415c35ac
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue Apr 14 11:16:23 2015 +0200
wined3d: Use finer grained colorkey state invalidation.
---
dlls/wined3d/cs.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 8271634..d66850a 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -913,6 +913,13 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
break;
case WINED3D_CKEY_SRC_BLT:
+ if (texture == cs->state.textures[0])
+ {
+ device_invalidate_state(cs->device, STATE_COLOR_KEY);
+ if (!(texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT))
+ device_invalidate_state(cs->device, STATE_RENDER(WINED3D_RS_COLORKEYENABLE));
+ }
+
texture->async.src_blt_color_key = op->color_key;
texture->async.color_key_flags |= WINED3D_CKEY_SRC_BLT;
break;
@@ -936,6 +943,9 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
break;
case WINED3D_CKEY_SRC_BLT:
+ if (texture == cs->state.textures[0] && texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT)
+ device_invalidate_state(cs->device, STATE_RENDER(WINED3D_RS_COLORKEYENABLE));
+
texture->async.color_key_flags &= ~WINED3D_CKEY_SRC_BLT;
break;
@@ -944,9 +954,6 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
break;
}
}
-
- if (texture->resource.bind_count && op->flags & WINED3D_CKEY_SRC_BLT)
- device_invalidate_state(cs->device, STATE_RENDER(WINED3D_RS_COLORKEYENABLE));
}
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
More information about the wine-cvs
mailing list