Henri Verbeet : wined3d: Fix use_vs() usage in vertexdeclaration().
Alexandre Julliard
julliard at winehq.org
Tue Dec 16 08:40:35 CST 2008
Module: wine
Branch: master
Commit: 143fb431e0959a6ba054a347e70e45eb5a710138
URL: http://source.winehq.org/git/wine.git/?a=commit;h=143fb431e0959a6ba054a347e70e45eb5a710138
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Dec 15 16:35:15 2008 +0100
wined3d: Fix use_vs() usage in vertexdeclaration().
---
dlls/wined3d/state.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 085e3d4..8ffcec0 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -4449,19 +4449,16 @@ static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
}
static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
- BOOL useVertexShaderFunction = FALSE, updateFog = FALSE;
+ BOOL updateFog = FALSE;
+ BOOL useVertexShaderFunction = use_vs(stateblock->wineD3DDevice);
BOOL usePixelShaderFunction = use_ps(stateblock->wineD3DDevice);
BOOL transformed;
/* Some stuff is in the device until we have per context tracking */
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
BOOL wasrhw = context->last_was_rhw;
- /* Shaders can be implemented using ARB_PROGRAM, GLSL, or software -
- * here simply check whether a shader was set, or the user disabled shaders
- */
- if (use_vs(device)) {
- useVertexShaderFunction = TRUE;
-
+ if (useVertexShaderFunction)
+ {
if(((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.reg_maps.fog != context->last_was_foggy_shader) {
updateFog = TRUE;
}
@@ -4470,8 +4467,6 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W
}
transformed = device->strided_streams.u.s.position_transformed;
- if (transformed) useVertexShaderFunction = FALSE;
-
if(transformed != context->last_was_rhw && !useVertexShaderFunction) {
updateFog = TRUE;
}
More information about the wine-cvs
mailing list