Module: wine
Branch: master
Commit: b07c48c499a0d452788e65fad3296d6a66876632
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b07c48c499a0d452788e65fad…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Wed Jan 10 11:44:55 2007 +0100
wined3d: Do not activate / deactivate texture dimensions twice.
---
dlls/wined3d/state.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 9ab7e62..bc2686f 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1440,7 +1440,12 @@ static void tex_colorop(DWORD state, IWi
return;
}
- if (mapped_stage != -1) activate_dimensions(stage, stateblock);
+ /* The sampler will also activate the correct texture dimensions, so no need to do it here
+ * if the sampler for this stage is dirty
+ */
+ if(!isStateDirty(stateblock->wineD3DDevice, STATE_SAMPLER(stage))) {
+ if (mapped_stage != -1) activate_dimensions(stage, stateblock);
+ }
/* Set the texture combiners */
if (GL_SUPPORT(NV_REGISTER_COMBINERS)) {
@@ -1816,7 +1821,9 @@ static void sampler(DWORD state, IWineD3
glEnable(stateblock->textureDimensions[sampler]);
checkGLcall("glEnable(stateblock->textureDimensions[sampler])");
} else if(sampler < stateblock->lowest_disabled_stage) {
- activate_dimensions(sampler, stateblock);
+ if(!isStateDirty(stateblock->wineD3DDevice, STATE_TEXTURESTAGE(sampler, WINED3DTSS_COLOROP))) {
+ activate_dimensions(sampler, stateblock);
+ }
if(stateblock->renderState[WINED3DRS_COLORKEYENABLE] && sampler == 0) {
/* If color keying is enabled update the alpha test, it depends on the existence
@@ -1827,10 +1834,10 @@ static void sampler(DWORD state, IWineD3
}
} else if(sampler < GL_LIMITS(texture_stages)) {
if(sampler < stateblock->lowest_disabled_stage) {
- /* TODO: Check if the colorop is dirty to do that job
- * TODO: What should I do with pixel shaders here ???
- */
- activate_dimensions(sampler, stateblock);
+ /* TODO: What should I do with pixel shaders here ??? */
+ if(!isStateDirty(stateblock->wineD3DDevice, STATE_TEXTURESTAGE(sampler, WINED3DTSS_COLOROP))) {
+ activate_dimensions(sampler, stateblock);
+ }
} /* Otherwise tex_colorop disables the stage */
glBindTexture(GL_TEXTURE_1D, stateblock->wineD3DDevice->dummyTextureName[sampler]);
checkGLcall("glBindTexture(GL_TEXTURE_1D, stateblock->wineD3DDevice->dummyTextureName[sampler])");
Module: wine
Branch: master
Commit: 70831d1d2dfcbe8353e597e57f0dc39b700534f1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=70831d1d2dfcbe8353e597e57…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Wed Jan 10 11:43:27 2007 +0100
wined3d: D3D7 vertex buffers never change their declaration.
---
dlls/wined3d/vertexbuffer.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c
index 181c244..da22469 100644
--- a/dlls/wined3d/vertexbuffer.c
+++ b/dlls/wined3d/vertexbuffer.c
@@ -165,6 +165,13 @@ inline BOOL WINAPI IWineD3DVertexBufferI
WineDirect3DVertexStridedData strided;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
+ /* In d3d7 the vertex buffer declaration NEVER changes because it is stored in the d3d7 vertex buffer.
+ * Once we have our declaration there is no need to look it up again.
+ */
+ if(((IWineD3DImpl *)device->wineD3D)->dxVersion == 7 && This->Flags & VBFLAG_HASDESC) {
+ return FALSE;
+ }
+
memset(&strided, 0, sizeof(strided));
/* There are certain vertex data types that need to be fixed up. The Vertex Buffers FVF doesn't
* help finding them, only the vertex declaration or the device FVF can determine that at drawPrim
Module: wine
Branch: master
Commit: 7fd246ebe3fcea47261c0a742f1e249412c3a1ca
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7fd246ebe3fcea47261c0a742…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Wed Jan 10 11:38:00 2007 +0100
wined3d: Add copyright statements to state.c.
---
dlls/wined3d/state.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index e4d3549..1ad3425 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1,7 +1,13 @@
/*
* Direct3D state management
*
- * Copyright 2006 Stefan D�singer for CodeWeavers
+ * Copyright 2002 Lionel Ulmer
+ * Copyright 2002-2005 Jason Edmeades
+ * Copyright 2003-2004 Raphael Junqueira
+ * Copyright 2004 Christian Costa
+ * Copyright 2005 Oliver Stieber
+ * Copyright 2006 Henri Verbeet
+ * Copyright 2006-2007 Stefan D�singer for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public