Module: wine
Branch: master
Commit: d37c6fc0a94b3ac3b4cce58afeafbdf225107b80
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d37c6fc0a94b3ac3b4cce58af…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Wed Sep 3 16:25:44 2008 +0200
wined3d: Depth stencil tracking depends on the value of This->render_offscreen.
---
dlls/wined3d/drawprim.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 3be34d3..24c7d1a 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -928,20 +928,21 @@ void drawPrimitive(IWineD3DDevice *iface,
}
}
+ /* Signals other modules that a drawing is in progress and the stateblock finalized */
+ This->isInDraw = TRUE;
+
+ ActivateContext(This, This->render_targets[0], CTXUSAGE_DRAWPRIM);
+
if (This->stencilBufferTarget) {
+ /* Note that this depends on the ActivateContext call above to set
+ * This->render_offscreen properly */
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);
}
- /* Signals other modules that a drawing is in progress and the stateblock finalized */
- This->isInDraw = TRUE;
-
/* Ok, we will be updating the screen from here onwards so grab the lock */
-
- ActivateContext(This, This->render_targets[0], CTXUSAGE_DRAWPRIM);
ENTER_GL();
-
{
GLenum glPrimType;
BOOL emulation = FALSE;
Module: wine
Branch: master
Commit: c614a2481a9f8377103d203e85dde926fa45431a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c614a2481a9f8377103d203e8…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Wed Sep 3 17:22:13 2008 +0200
libwine: Reserve some malloc space on Solaris before we start mapping other things.
---
libs/wine/mmap.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c
index 8b79580..ff117cc 100644
--- a/libs/wine/mmap.c
+++ b/libs/wine/mmap.c
@@ -286,7 +286,30 @@ static void reserve_area( void *addr, void *end )
}
#endif
}
+
+
+/***********************************************************************
+ * reserve_malloc_space
+ *
+ * Solaris malloc is not smart enough to obtain space through mmap(), so try to make
+ * sure that there is some available sbrk() space before we reserve other things.
+ */
+static void reserve_malloc_space( size_t size )
+{
+#ifdef __sun
+ size_t i, count = size / 1024;
+ void **ptrs = malloc( count * sizeof(ptrs[0]) );
+
+ if (!ptrs) return;
+
+ for (i = 0; i < count; i++) if (!(ptrs[i] = malloc( 1024 ))) break;
+ if (i--) /* free everything except the last one */
+ while (i) free( ptrs[--i] );
+ free( ptrs );
#endif
+}
+
+#endif /* __i386__ */
/***********************************************************************
@@ -325,6 +348,8 @@ void mmap_init(void)
char * const stack_ptr = &stack;
char *user_space_limit = (char *)0x7ffe0000;
+ reserve_malloc_space( 8 * 1024 * 1024 );
+
/* check for a reserved area starting at the user space limit */
/* to avoid wasting time trying to allocate it again */
LIST_FOR_EACH( ptr, &reserved_areas )