Module: wine
Branch: master
Commit: 8be020776b51e08172cce0c43689f884dc0dde7d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8be020776b51e08172cce0c43…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Wed Jun 17 10:19:52 2009 +0200
wined3d: Avoid some unneeded depthstencil copies.
---
dlls/wined3d/drawprim.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index c92659f..acbfbf9 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -574,10 +574,16 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT numberOfVertice
if (This->stencilBufferTarget) {
/* Note that this depends on the ActivateContext call above to set
- * This->render_offscreen properly */
+ * This->render_offscreen properly. We don't currently take the
+ * Z-compare function into account, but we could skip loading the
+ * depthstencil for D3DCMP_NEVER and D3DCMP_ALWAYS as well. Also note
+ * that we never copy the stencil data.*/
DWORD location = This->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN;
- surface_load_ds_location(This->stencilBufferTarget, location);
- surface_modify_ds_location(This->stencilBufferTarget, location);
+ if (This->stateBlock->renderState[WINED3DRS_ZWRITEENABLE]
+ || This->stateBlock->renderState[WINED3DRS_ZENABLE])
+ surface_load_ds_location(This->stencilBufferTarget, location);
+ if (This->stateBlock->renderState[WINED3DRS_ZWRITEENABLE])
+ surface_modify_ds_location(This->stencilBufferTarget, location);
}
/* Ok, we will be updating the screen from here onwards so grab the lock */
Module: wine
Branch: master
Commit: fccb3d82fd5b05f0ece48e2c0547ca3357c12a2e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fccb3d82fd5b05f0ece48e2c0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Wed Jun 17 10:17:09 2009 +0200
wined3d: Fall back to backbuffer offscreen rendering if FBOs are unavailable.
Backbuffer appears to be a better choice than PBuffer at the moment, since
PBuffer appears to be somewhat broken.
---
dlls/wined3d/directx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 05443fc..3354f7b 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1031,8 +1031,8 @@ static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
/* We can only use ORM_FBO when the hardware supports it. */
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && !gl_info->supported[EXT_FRAMEBUFFER_OBJECT]) {
- WARN_(d3d_caps)("GL_EXT_framebuffer_object not supported, falling back to PBuffer offscreen rendering mode.\n");
- wined3d_settings.offscreen_rendering_mode = ORM_PBUFFER;
+ WARN_(d3d_caps)("GL_EXT_framebuffer_object not supported, falling back to backbuffer offscreen rendering mode.\n");
+ wined3d_settings.offscreen_rendering_mode = ORM_BACKBUFFER;
}
/* MRTs are currently only supported when FBOs are used. */