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:
athlon64:/usr/games/flatout2# ./flatout2 fixme:d3d:IWineD3DDeviceImpl_CreateAdditionalSwapChain The app requests more than one back buffer, this can't be supported properly. Please configure the application to use double buffering(=1 back buffer) if possible fixme:d3d:IWineD3DDeviceImpl_GetAvailableTextureMem (0x17fe20) : stub, simulating 256MB for now, returning 256MB left fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub fixme:d3d:IWineD3DDeviceImpl_ValidateDevice (0x17fe20) : stub err:ole:CoInitializeEx Attempt to change threading model of this apartment from multi-threaded to apartment threaded fixme:wave:DBSB_MMAPLoop Can't access sound driver's buffer directly. err:ole:CoInitializeEx Attempt to change threading model of this apartment from multi-threaded to apartment threaded fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE wine: Unhandled page fault on read access to 0x7c3a4270 at address 0x7c3a4270 (thread 0011), starting debugger... Unhandled exception: page fault on read access to 0x7c3a4270 in 32-bit code (0x7c3a4270). fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x17fe20) : stub Register dump: CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b EIP:7c3a4270 ESP:7b8cea60 EBP:7b8ceab8 EFLAGS:00210246( - 00 -RIZP1) EAX:00000000 EBX:7c3be764 ECX:00000000 EDX:7b8cea90 ESI:7b8cea90 EDI:00010028 Stack dump: 0x7b8cea60: 00000000 00000000 00000000 00000000 0x7b8cea70: fffffffd 00000000 00000000 00000000 0x7b8cea80: 00000001 7ffd2000 00000018 7ef935ef 0x7b8cea90: 00000000 00000012 00000000 00000000 0x7b8ceaa0: 00002357 00000000 00000000 7efe5368 0x7b8ceab0: 0173fc34 7c3a41b0 7b8ceb58 7efc81bb Backtrace: =>1 0x7c3a4270 (0x7b8ceab8) 2 0x7efc81bb call_thread_func+0x3b(rtl_func=<register EDI not in topmost frame>, arg=<register ESI not in topmost frame>) [/root/.WineCVS/sources/cvswine/wine/dlls/ntdll/thread.c:371] in ntdll (0x7b8ceb58) 3 0x7efc8461 in ntdll (+0x48461) (0x7b8cf458) err:dbghelp:elf_load_debug_info_from_map Bad CRC for module (got aa34a405 while expecting ef5281d2) 4 0xb7df10bd start_thread+0x6d() in libpthread.so.0 (0x7b8cf4c8) err:dbghelp:elf_load_debug_info_from_map Bad CRC for module (got 61a1649a while expecting f01d3064) 5 0xb7d859ee __clone+0x5e() in libc.so.6 (0x00000000) 0x7c3a4270: -- no code accessible -- Modules: Module Address Debug info Name (83 modules) PE 400000-152e000 Deferred flatout2 PE 1740000-19a0000 Deferred d3dx9_30 ELF 7bf00000-7bf03000 Deferred <wine-loader> ELF 7c663000-7c6ac000 Deferred dsound<elf> -PE 7c670000-7c6ac000 \ dsound ELF 7c781000-7c7b3000 Deferred uxtheme<elf> -PE 7c790000-7c7b3000 \ uxtheme ELF 7c7b3000-7c874000 Deferred libasound.so.2 ELF 7c87e000-7c893000 Deferred midimap<elf> -PE 7c880000-7c893000 \ midimap ELF 7c893000-7c8be000 Deferred winealsa<elf> -PE 7c8a0000-7c8be000 \ winealsa ELF 7cb5a000-7cb5f000 Deferred libxfixes.so.3 ELF 7cb5f000-7cb68000 Deferred libxcursor.so.1 PE 7cb70000-7cb85000 --none-- msacm32 ELF 7cb87000-7cb8a000 Deferred libxrandr.so.2 ELF 7cb8a000-7cb92000 Deferred libxrender.so.1 ELF 7cb92000-7cb95000 Deferred libxinerama.so.1 ELF 7cb98000-7cbb4000 Deferred imm32<elf> -PE 7cba0000-7cbb4000 \ imm32 ELF 7d55e000-7d5ec000 Deferred winex11<elf> -PE 7d570000-7d5ec000 \ winex11 ELF 7d650000-7d670000 Deferred libexpat.so.1 ELF 7d670000-7d69b000 Deferred libfontconfig.so.1 ELF 7d6ba000-7d724000 Deferred libfreetype.so.6 ELF 7d743000-7d769000 Deferred msacm32<elf> ELF 7d769000-7d7cd000 Deferred msvcrt<elf> -PE 7d780000-7d7cd000 \ msvcrt ELF 7d835000-7d840000 Deferred libgcc_s.so.1 ELF 7d925000-7d927000 Deferred libnvidia-tls.so.1 ELF 7d927000-7e298000 Deferred libglcore.so.1 ELF 7e298000-7e29d000 Deferred libxdmcp.so.6 ELF 7e29d000-7e32d000 Deferred libglu.so.1 ELF 7e32d000-7e3c1000 Deferred libgl.so.1 ELF 7e3c1000-7e4ad000 Deferred libx11.so.6 ELF 7e4ad000-7e4bb000 Deferred libxext.so.6 ELF 7e4bb000-7e4d3000 Deferred libice.so.6 ELF 7e4d3000-7e4dc000 Deferred libsm.so.6 ELF 7e4dc000-7e596000 Deferred wined3d<elf> -PE 7e4f0000-7e596000 \ wined3d ELF 7e596000-7e5c1000 Deferred d3d9<elf> -PE 7e5a0000-7e5c1000 \ d3d9 ELF 7e5c1000-7e5ed000 Deferred ws2_32<elf> -PE 7e5d0000-7e5ed000 \ ws2_32 ELF 7e5ed000-7e6aa000 Deferred comctl32<elf> -PE 7e600000-7e6aa000 \ comctl32 ELF 7e6aa000-7e6bd000 Deferred libresolv.so.2 ELF 7e6c6000-7e6da000 Deferred libz.so.1 ELF 7e6dc000-7e6fa000 Deferred iphlpapi<elf> -PE 7e6e0000-7e6fa000 \ iphlpapi ELF 7e6fa000-7e74f000 Deferred rpcrt4<elf> -PE 7e710000-7e74f000 \ rpcrt4 ELF 7e74f000-7e7e8000 Deferred ole32<elf> -PE 7e760000-7e7e8000 \ ole32 ELF 7e7e8000-7e840000 Deferred shlwapi<elf> -PE 7e800000-7e840000 \ shlwapi ELF 7e840000-7e935000 Deferred shell32<elf> -PE 7e850000-7e935000 \ shell32 ELF 7e935000-7e97b000 Deferred advapi32<elf> -PE 7e940000-7e97b000 \ advapi32 ELF 7e97b000-7ea0e000 Deferred gdi32<elf> -PE 7e990000-7ea0e000 \ gdi32 ELF 7ea0e000-7eb48000 Deferred user32<elf> -PE 7ea30000-7eb48000 \ user32 ELF 7eb48000-7ebd6000 Deferred winmm<elf> -PE 7eb50000-7ebd6000 \ winmm ELF 7edd6000-7eefc000 Deferred kernel32<elf> -PE 7edf0000-7eefc000 \ kernel32 ELF 7eefc000-7ef07000 Deferred libnss_files.so.2 ELF 7ef07000-7ef11000 Deferred libnss_nis.so.2 ELF 7ef11000-7ef27000 Deferred libnsl.so.1 ELF 7ef27000-7ef4c000 Deferred libm.so.6 ELF 7ef4c000-7ef4f000 Deferred libxau.so.6 ELF 7ef6b000-7f000000 Dwarf ntdll<elf> -PE 7ef80000-7f000000 \ ntdll ELF b7cb0000-b7cb5000 Deferred libxxf86vm.so.1 ELF b7cb6000-b7cba000 Deferred libdl.so.2 ELF b7cba000-b7dec000 Export libc.so.6 ELF b7dec000-b7dfe000 Export libpthread.so.0 ELF b7e11000-b7e15000 Deferred iso8859-2.so ELF b7e15000-b7e1e000 Deferred libnss_compat.so.2 ELF b7e1e000-b7f2f000 Deferred libwine.so.1 ELF b7f31000-b7f48000 Deferred ld-linux.so.2 Threads: process tid prio (all id:s are in hex) 0000000a 0000000c 0 0000000b 0 00000008 (D) G:\usr\games\flatout2\FlatOut2.exe 00000012 15 00000011 0 <== 00000010 0 0000000f 2 0000000e 15 0000000d 15 00000009 0
Stefan Dösinger napsal(a):
The ddraw index buffer handling needs a proper fix somewhen, either by an VB + up Indices drawing method(but there are already too many of them) or my a SetMem method in index buffers
This patch should(hopefully) fix the regressions introduced with my former index buffer patch
From fadece932e1ff556a4434545d7bf6753aaabdaf1 Mon Sep 17 00:00:00 2001 From: Stefan Doesinger stefan@codeweavers.com Date: Tue, 20 Feb 2007 16:15:04 +0100 Subject: [PATCH] D3D: Index buffer fixes
Some things that missed in my former patch. Do not unset the index buffer in _Release, that is not needed. Dirtify the index buffer state in unlock because the bound buffer is changed. GL vbos are GLuints. The index buffer used by ddraw should have dynamic usage, and preferably be locked only on the size that has to be locked
dlls/ddraw/device.c | 2 +- dlls/ddraw/direct3d.c | 2 +- dlls/wined3d/device.c | 2 +- dlls/wined3d/indexbuffer.c | 9 +++++++-- 4 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index c201df7..0814921 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -3691,7 +3691,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface, */ hr = IWineD3DIndexBuffer_Lock(This->indexbuffer, 0 /* OffSetToLock */,
0 /* SizeToLock - doesn't matter */,
assert(IndexCount < 0x100000);IndexCount * sizeof(WORD), (BYTE **) &LockedIndices, 0 /* Flags */);
diff --git a/dlls/ddraw/direct3d.c b/dlls/ddraw/direct3d.c index 4896ba7..b716a60 100644 --- a/dlls/ddraw/direct3d.c +++ b/dlls/ddraw/direct3d.c @@ -804,7 +804,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface, */ hr = IWineD3DDevice_CreateIndexBuffer(This->wineD3DDevice, 0x40000, /* Length. Don't know how long it should be */
0, /* Usage */
WINED3DUSAGE_DYNAMIC, /* Usage */ WINED3DFMT_INDEX16, /* Format. D3D7 uses WORDS */ WINED3DPOOL_DEFAULT, &object->indexbuffer,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c039798..2ac8797 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4294,7 +4294,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice * UINT idxStride = 2; IWineD3DIndexBuffer *pIB; WINED3DINDEXBUFFER_DESC IdxBufDsc;
- GLint vbo;
GLuint vbo;
pIB = This->stateBlock->pIndexData; This->stateBlock->streamIsUP = FALSE;
diff --git a/dlls/wined3d/indexbuffer.c b/dlls/wined3d/indexbuffer.c index b16ddd0..ae2294a 100644 --- a/dlls/wined3d/indexbuffer.c +++ b/dlls/wined3d/indexbuffer.c @@ -60,8 +60,11 @@ static ULONG WINAPI IWineD3DIndexBufferImpl_Release(IWineD3DIndexBuffer *iface) if (ref == 0) { if(This->vbo) { ENTER_GL();
GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0));
checkGLcall("glBindBufferARB");
/* No need to manually unset the buffer. glDeleteBuffers unsets it for the current context,
* but not for other contexts. However, because the d3d buffer is destroyed the app has to
* unset it before doing the next draw, thus dirtifying the index buffer state and forcing
* binding a new buffer
*/ GL_EXTCALL(glDeleteBuffersARB(1, &This->vbo)); checkGLcall("glDeleteBuffersARB"); LEAVE_GL();
@@ -159,6 +162,8 @@ static HRESULT WINAPI IWineD3DIndexBufferImpl_Unlock(IWineD3DIndexBuffer *iface) LEAVE_GL(); This->dirtystart = 0; This->dirtyend = 0;
/* TODO: Move loading into preload when the buffer is used, that avoids dirtifying the state */
} return WINED3D_OK;IWineD3DDeviceImpl_MarkStateDirty(This->resource.wineD3DDevice, STATE_INDEXBUFFER);
}
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.
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
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?
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 stefan@codeweavers.com 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));
Am Freitag 23 Februar 2007 21:44 schrieb Mirek:
Thanks! This patch fixed Oblivion and even Flatout 2!
Cool.
I wonder why disabling index buffer vbos entirely didn't fix flatout 2 :-O I sense that there will be some more regressions on cards that do not support vbos.
Stefan Dösinger napsal(a):
Am Freitag 23 Februar 2007 21:44 schrieb Mirek:
Thanks! This patch fixed Oblivion and even Flatout 2!
Cool.
I wonder why disabling index buffer vbos entirely didn't fix flatout 2 :-O I sense that there will be some more regressions on cards that do not support vbos.
Yes, it is realy strange, I tested it twice with same results. But now i tried it again, I first run 3D setup for Flatout 2, and after that game starts without any problems only with return; added in CreateIndexBufferVBO(). So it looks like it should work on cards without fbo.
Mirek