[PATCH 2/2] wined3d: Read WINED3D_TEXTURE_COLOR_KEY and gl_color_key to find format conversions.

Stefan Dösinger stefan at codeweavers.com
Tue Feb 17 16:09:37 CST 2015


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)
         {
-- 
2.3.0




More information about the wine-patches mailing list