Commit bd6a6ad2 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Move WINED3DTSS_ALPHAOP to the state table.

parent 762af471
......@@ -4628,9 +4628,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
IWineD3DBaseTexture_AddRef(This->updateStateBlock->textures[Stage]);
if(oldTexture == NULL) {
/* The source arguments for color and alpha ops have different meanings when a NULL texture is bound,
* so the COLOROP has to be dirtified.(Alphaop is not in the state table yet)
* so the COLOROP and ALPHAOP have to be dirtified.
*/
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(Stage, WINED3DTSS_COLOROP));
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(Stage, WINED3DTSS_ALPHAOP));
}
}
......@@ -4638,6 +4639,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
IWineD3DBaseTexture_Release(oldTexture);
if(pTexture == NULL) {
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(Stage, WINED3DTSS_COLOROP));
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(Stage, WINED3DTSS_ALPHAOP));
}
}
......
......@@ -1962,23 +1962,6 @@ static void drawPrimitiveUploadTextures(IWineD3DDeviceImpl* This) {
This->stateBlock->textureDimensions[i] = GL_TEXTURE_1D;
glBindTexture(GL_TEXTURE_1D, This->dummyTextureName[i]);
}
/** these ops apply to the texture unit, so they are preserved between texture changes, but for now brute force and reapply all
dx9_1pass_emboss_bump_mapping and dx9_2pass_emboss_bump_mapping are good texts to make sure the states are being applied when needed **/
if (GL_SUPPORT(NV_REGISTER_COMBINERS)) {
/* alphaop */
set_tex_op_nvrc((IWineD3DDevice *)This, TRUE, i, This->stateBlock->textureState[i][WINED3DTSS_ALPHAOP],
This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG1],
This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG2],
This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG0],
texture_idx);
} else {
/* alphaop */
set_tex_op((IWineD3DDevice *)This, TRUE, i, This->stateBlock->textureState[i][WINED3DTSS_ALPHAOP],
This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG1],
This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG2],
This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG0]);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment