[PATCH 4/5] wined3d: Remove a texture dimension check in state_alpha().

Henri Verbeet hverbeet at codeweavers.com
Thu Mar 8 13:27:15 CST 2012


I don't think there's any reason color-keying shouldn't work on e.g. cube
textures, although it probably isn't very common either.
---
 dlls/wined3d/state.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index a5d748a..811d853 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -530,16 +530,10 @@ static void state_alpha(struct wined3d_context *context, const struct wined3d_st
      */
     if (state->textures[0])
     {
-        struct wined3d_texture *texture = state->textures[0];
-        GLenum texture_dimensions = texture->target;
+        struct wined3d_surface *surface = surface_from_resource(state->textures[0]->sub_resources[0]);
 
-        if (texture_dimensions == GL_TEXTURE_2D || texture_dimensions == GL_TEXTURE_RECTANGLE_ARB)
-        {
-            struct wined3d_surface *surf = surface_from_resource(texture->sub_resources[0]);
-
-            if (surf->CKeyFlags & WINEDDSD_CKSRCBLT)
-                enable_ckey = TRUE;
-        }
+        if (surface->CKeyFlags & WINEDDSD_CKSRCBLT)
+            enable_ckey = TRUE;
     }
 
     if (enable_ckey || context->last_was_ckey)
-- 
1.7.3.4




More information about the wine-patches mailing list