=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Read WINED3D_TEXTURE_COLOR_KEY and gl_color_key to find format conversions.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 18 09:57:19 CST 2015


Module: wine
Branch: master
Commit: 52ab9e382e7ac7a538a2688aee9cc2fb8367cc40
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=52ab9e382e7ac7a538a2688aee9cc2fb8367cc40

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Feb 17 23:09:37 2015 +0100

wined3d: Read WINED3D_TEXTURE_COLOR_KEY and gl_color_key to find format conversions.

The idea is to make it clear that wined3d_texture_load is responsible
for checking the color key for changes. Once we can do color keying in
the shader we also have one place where we can disable the surface
conversion.

---

 dlls/wined3d/surface.c | 2 +-
 dlls/wined3d/utils.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 06d8433..096579f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4217,7 +4217,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
         if (texture->swapchain && texture->swapchain->palette)
             palette = texture->swapchain->palette;
         conversion->convert(data.addr, src_pitch, mem, dst_pitch,
-                width, height, palette, &texture->src_blt_color_key);
+                width, height, palette, &texture->gl_color_key);
         src_pitch = dst_pitch;
         data.addr = mem;
     }
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 9e9fc49..1ce23ac 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -795,7 +795,7 @@ const struct wined3d_color_key_conversion * wined3d_format_get_color_key_convers
         WINED3DFMT_B8G8R8A8_UNORM,  convert_p8_uint_b8g8r8a8_unorm
     };
 
-    if (need_alpha_ck && (texture->color_key_flags & WINED3D_CKEY_SRC_BLT))
+    if (need_alpha_ck && (texture->flags & WINED3D_TEXTURE_COLOR_KEY))
     {
         for (i = 0; i < sizeof(color_key_info) / sizeof(*color_key_info); ++i)
         {




More information about the wine-cvs mailing list