From b16dbf46da304f24163c21b072740e55fc34ea35 Mon Sep 17 00:00:00 2001 From: "H. Verbeet" Date: Sun, 17 Jun 2007 23:39:24 +0200 Subject: [PATCH] wined3d: Mask texture stage state arguments with WINED3DTA_SELECTMASK when comparing them. --- dlls/wined3d/utils.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index d592bc46a81..65bff5cc7b7 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -834,9 +834,12 @@ static BOOL is_invalid_op(IWineD3DDeviceImpl *This, int stage, WINED3DTEXTUREOP if (op == WINED3DTOP_DISABLE) return FALSE; if (This->stateBlock->textures[stage]) return FALSE; - if (arg1 == WINED3DTA_TEXTURE && op != WINED3DTOP_SELECTARG2) return TRUE; - if (arg2 == WINED3DTA_TEXTURE && op != WINED3DTOP_SELECTARG1) return TRUE; - if (arg3 == WINED3DTA_TEXTURE && (op == WINED3DTOP_MULTIPLYADD || op == WINED3DTOP_LERP)) return TRUE; + if ((arg1 & WINED3DTA_SELECTMASK) == WINED3DTA_TEXTURE + && op != WINED3DTOP_SELECTARG2) return TRUE; + if ((arg2 & WINED3DTA_SELECTMASK) == WINED3DTA_TEXTURE + && op != WINED3DTOP_SELECTARG1) return TRUE; + if ((arg3 & WINED3DTA_SELECTMASK) == WINED3DTA_TEXTURE + && (op == WINED3DTOP_MULTIPLYADD || op == WINED3DTOP_LERP)) return TRUE; return FALSE; }