Module: wine Branch: master Commit: d219903c612b4e0c770b657ffddcef21d04fb9e4 URL: https://gitlab.winehq.org/wine/wine/-/commit/d219903c612b4e0c770b657ffddcef2...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Feb 16 19:42:41 2023 -0600
wined3d: Check for WINED3DUSAGE_LEGACY_CUBEMAP instead of checking the GL texture target.
This check was introduced in 4640be8dc834. At that point the only way for that condition to be false was for a cube map texture.
It's not clear why cube maps are relevant here; we have no tests for this, but it seems most expedient to just preserve the intent of the check.
---
dlls/wined3d/utils.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index cda31374c93..a0b1fded9f5 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -6479,11 +6479,7 @@ void wined3d_ffp_get_fs_settings(const struct wined3d_context *context, const st
if (!i && texture && state->render_states[WINED3D_RS_COLORKEYENABLE]) { - GLenum texture_dimensions; - - texture_dimensions = wined3d_texture_gl(texture)->target; - - if (texture_dimensions == GL_TEXTURE_2D || texture_dimensions == GL_TEXTURE_RECTANGLE_ARB) + if (!(texture->resource.usage & WINED3DUSAGE_LEGACY_CUBEMAP)) { if (texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT && !texture->resource.format->alpha_size) {