wined3d: Mask texture stage state arguments with WINED3DTA_SELECTMASK when comparing them.

This commit is contained in:
H. Verbeet 2007-06-17 23:39:24 +02:00 committed by Alexandre Julliard
parent 9f8083c646
commit b16dbf46da
1 changed files with 6 additions and 3 deletions

View File

@ -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;
}