wined3d: Get rid of incorrect usage of "tex_unit_map".

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-03-13 11:57:20 +01:00 committed by Alexandre Julliard
parent f2af535c05
commit 806479e432
1 changed files with 7 additions and 6 deletions

View File

@ -3489,7 +3489,9 @@ static void sampler_texmatrix(struct wined3d_context *context, const struct wine
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
if(!texture) return; if (!texture)
return;
/* The fixed function np2 texture emulation uses the texture matrix to fix up the coordinates /* The fixed function np2 texture emulation uses the texture matrix to fix up the coordinates
* wined3d_texture_apply_state_changes() multiplies the set matrix with a fixup matrix. Before the * wined3d_texture_apply_state_changes() multiplies the set matrix with a fixup matrix. Before the
* scaling is reapplied or removed, the texture matrix has to be reapplied * scaling is reapplied or removed, the texture matrix has to be reapplied
@ -3499,17 +3501,16 @@ static void sampler_texmatrix(struct wined3d_context *context, const struct wine
*/ */
if (sampler < MAX_TEXTURES) if (sampler < MAX_TEXTURES)
{ {
const BOOL texIsPow2 = !(texture->flags & WINED3D_TEXTURE_POW2_MAT_IDENT); const BOOL tex_is_pow2 = !(texture->flags & WINED3D_TEXTURE_POW2_MAT_IDENT);
if (texIsPow2 || (context->lastWasPow2Texture & (1u << sampler))) if (tex_is_pow2 || (context->lastWasPow2Texture & (1u << sampler)))
{ {
if (texIsPow2) if (tex_is_pow2)
context->lastWasPow2Texture |= 1u << sampler; context->lastWasPow2Texture |= 1u << sampler;
else else
context->lastWasPow2Texture &= ~(1u << sampler); context->lastWasPow2Texture &= ~(1u << sampler);
transform_texture(context, state, transform_texture(context, state, STATE_TEXTURESTAGE(sampler, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS));
STATE_TEXTURESTAGE(context->tex_unit_map[sampler], WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS));
} }
} }
} }