1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

wined3d: Check for WINED3DUSAGE_LEGACY_CUBEMAP instead of checking the GL texture target.

This check was introduced in 4640be8dc8. 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.
This commit is contained in:
Zebediah Figura 2023-02-16 19:42:41 -06:00 committed by Alexandre Julliard
parent df70800b12
commit d219903c61

View file

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