Module: wine
Branch: master
Commit: c698052b31231b757bad25665a03ddc3a115d76f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c698052b31231b757bad25665…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Wed Nov 14 22:45:00 2007 +0100
wined3d: Destroy GL contexts before changing the screen resolution.
---
dlls/wined3d/swapchain.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 81f17c3..2eaa812 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -106,6 +106,9 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB
HeapFree(GetProcessHeap(), 0, This->backBuffer);
}
+ for(i = 0; i < This->num_contexts; i++) {
+ DestroyContext(This->wineD3DDevice, This->context[i]);
+ }
/* Restore the screen resolution if we rendered in fullscreen
* This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9
* this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution
@@ -118,9 +121,6 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB
mode.Format = This->orig_fmt;
IWineD3DDevice_SetDisplayMode((IWineD3DDevice *) This->wineD3DDevice, 0, &mode);
}
- for(i = 0; i < This->num_contexts; i++) {
- DestroyContext(This->wineD3DDevice, This->context[i]);
- }
HeapFree(GetProcessHeap(), 0, This->context);
HeapFree(GetProcessHeap(), 0, This);
Module: wine
Branch: master
Commit: 683c258ff4cf09d367ee0cb28c8768615522ac1d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=683c258ff4cf09d367ee0cb28…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Wed Nov 14 21:49:14 2007 +0100
wined3d: Remove a hack that slipped in.
---
dlls/wined3d/vertexshader.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c
index e957eb4..5baf00d 100644
--- a/dlls/wined3d/vertexshader.c
+++ b/dlls/wined3d/vertexshader.c
@@ -349,9 +349,7 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
* before the homogenous divide, so we have to take the w into account: z = ((z / w) * 2 - 1) * w,
* which is the same as z = z / 2 - w.
*/
- shader_addline(&buffer, "tmp0 = gl_Position;\n");
- shader_addline(&buffer, "gl_Position.z = tmp0.z * 2.0;\n");
- shader_addline(&buffer, "gl_Position.z = gl_Position.z - gl_Position.w;\n");
+ shader_addline(&buffer, "gl_Position.z = gl_Position.z * 2.0 - gl_Position.w;\n");
shader_addline(&buffer, "}\n");