Thanks! This patch fixed Oblivion and even Flatout 2!
Mirek
Stefan Dösinger napsal(a):
Am Freitag 23 Februar 2007 21:20 schrieb Mirek:
Stefan Dösinger napsal(a):
Am Mittwoch 21 Februar 2007 00:22 schrieb Mirek:
Some games are still broken with latest 13 patches from your tree.
Oblivion still hangs while loading game and Flatout 2 crashed after 2
seconds with this output:
Can you try to add a return; at the beginning of CreateIndexBufferVBO()
in dlls/wined3d/device.c, before the ENTER_GL()? If that does not fix the
regressions then some different patches added other breakage.
Hi, regression in Flatout 2 is bigger i should do regression testing and
find patch which broke start of game, this doesn't fix it, but Oblivion
with this hack works without problems (23.02.2007 CVS).
Mirek
Can you test the attached patch with oblivion?
------------------------------------------------------------------------
From faa5d7a0b710ded8f49db6337eb880cc4cd05e8b Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <[EMAIL PROTECTED]>
Date: Fri, 23 Feb 2007 17:16:56 +0100
Subject: [PATCH] WineD3D: Index buffer creation adjustments
Index buffer creation changes the bound gl buffer, thus the state has to
be dirtified, simmilar to locking
In an error case the function returned without calling LEAVE_GL()
---
dlls/wined3d/device.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b1e9c2d..500a857 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -447,6 +447,11 @@ static void CreateIndexBufferVBO(IWineD3DDeviceImpl *This,
IWineD3DIndexBufferIm
GLenum error, glUsage;
TRACE("Creating VBO for Index Buffer %p\n", object);
+ /* The following code will modify the ELEMENT_ARRAY_BUFFER binding, make sure it is
+ * restored on the next draw
+ */
+ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER);
+
ENTER_GL();
while(glGetError());
@@ -454,8 +459,7 @@ static void CreateIndexBufferVBO(IWineD3DDeviceImpl *This, IWineD3DIndexBufferIm
error = glGetError();
if(error != GL_NO_ERROR || object->vbo == 0) {
ERR("Creating a vbo failed, continueing without vbo for this
buffer\n");
- object->vbo = 0;
- return;
+ goto out;
}
GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, object->vbo));