<br><br><div class="gmail_quote">2009/1/26 Claudio Ciccani <span dir="ltr"><<a href="mailto:klan@users.sf.net">klan@users.sf.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I found that the reason of the crash was that VBOs were not removed when<br>
using drawStridedSlow for vertex blending.<br>
Attached is the modified patch, which doesn't make NOLF2 crash.<br>
<br>
<br>
Il giorno lun, 26/01/2009 alle 12.12 +0100, Claudio Ciccani ha scritto:<br>
<div><div></div><div class="Wj3C7c">> Il giorno dom, 25/01/2009 alle 23.19 +0100, David Adam ha scritto:<br>
> ><br>
> ><br>
> > 2009/1/25 Claudio Ciccani <<a href="mailto:klan@users.sf.net">klan@users.sf.net</a>><br>
> ><br>
> > The patch implements a software fallback for vertex blending<br>
> > in<br>
> > drawStridedSlow, fixing Bug #6955.<br>
> > Although vertex blending is an old and outdated extension,<br>
> > there are<br>
> > still many applications(games) relying on it nowadays. This<br>
> > because the<br>
> > extension is generally supported by Direct3D, either directly<br>
> > in<br>
> > hardware (using vertex programs) or in software.<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > This patch makes NOLF2 demo crashes.<br>
> ><br>
> ><br>
> > Register<br>
> > dump:<br>
> > CS:0073 SS:007b DS:007b ES:007b FS:0033<br>
> > GS:003b<br>
> > EIP:7e6095c7 ESP:0033f0b4 EBP:0033f1ec EFLAGS:00010246( - 00<br>
> > -RIZP1)<br>
> > EAX:00ec1b28 EBX:7e6bbc54 ECX:0000014c<br>
> > EDX:00000000<br>
> > ESI:00000048<br>
> > EDI:00000000<br>
> > Stack<br>
> > dump:<br>
> > 0x0033f0b4: 00000000 00000000 00000000<br>
> > 3f800000<br>
> > 0x0033f0c4: 0033f110 7d05e000 7c03d008<br>
> > 7c7aa346<br>
> > 0x0033f0d4: 00000000 00000003 7e6bc7a0<br>
> > 7e69ee95<br>
> > 0x0033f0e4: 7e69e648 00000001 0000000c<br>
> > 00000010<br>
> > 0x0033f0f4: 795a5f68 7d09c0ac 0002d008<br>
> > 00ebd44c<br>
> > 0x0033f104: 00eba698 00ebd7a8 00000000<br>
> > 00000007<br>
> > Backtrace:<br>
> > =>0 0x7e6095c7 drawStridedSlow+0x697(iface=0xeba698, sd=0xebd44c,<br>
> > NumVertexes=72, glPrimType=4, idxData=0x31dca00, idxSize=2,<br>
> > minIndex=0, startIdx=0) [/home/david/wine/dlls/wined3d/drawprim.c:307]<br>
> > in wined3d (0x0033f1ec)<br>
> > 1 0x7e60ea1b drawPrimitive+0x101b(iface=0xeba698, PrimitiveType=4,<br>
> > NumPrimitives=24, numberOfVertices=24, StartIdx=0, idxSize=<is not<br>
> > available>, idxData=(nil), minIndex=0)<br>
> > [/home/david/wine/dlls/wined3d/drawprim.c:1024] in wined3d<br>
> > (0x0033f55c)<br>
> > 2 0x7e5e41f9 IWineD3DDeviceImpl_DrawIndexedPrimitive<br>
> > +0xe9(iface=0xeba698, PrimitiveType=WINED3DPT_TRIANGLELIST,<br>
> > minIndex=0, NumVertices=24, startIndex=0, primCount=24)<br>
> > [/home/david/wine/dlls/wined3d/device.c:5314] in wined3d (0x0033f5cc)<br>
> > 3 0x7e6d43b6 IDirect3DDevice8Impl_DrawIndexedPrimitive<br>
> > +0x96(iface=<register ESI not in topmost frame>,<br>
> > PrimitiveType=D3DPT_TRIANGLELIST, MinVertexIndex=0, NumVertices=24,<br>
> > startIndex=0, primCount=24) [/home/david/wine/dlls/d3d8/device.c:1419]<br>
> > in d3d8<br>
> > (0x0033f5fc)<br>
> > 0x7e6095c7 drawStridedSlow+0x697<br>
> > [/home/david/wine/dlls/wined3d/drawprim.c:307] in wined3d: flds<br>
> > 0x0(%ecx)<br>
> > 307 m =<br>
> > &stateBlock->transforms[WINED3DTS_WORLDMATRIX((indices ? indices[0] :<br>
> > 0))].u.m[0][0];<br>
> > Modules:<br>
><br>
> Really strange! Tested the patch against other games and it worked.<br>
> With NOLF2 I'm getting a crash too, but at a different location:<br>
><br>
> 1 0x7e6217ca drawPrimitive+0x112a(iface=0xec7660, PrimitiveType=4,<br>
> NumPrimitives=18, numberOfVertices=20, StartIdx=0, idxSize=2,<br>
> idxData=0x3d871e0, minIndex=0)<br>
> [/home/klan/src/wine/dlls/wined3d/drawprim.c:540] in wined3d<br>
> (0x00000000)<br>
> 0x7d2b3771: movl 0x0(%ecx),%edx<br>
><br>
> 540 for (texture = 0; tmp_tex_mask; tmp_tex_mask >>= 1, ++texture)<br>
><br>
><br>
><br>
><br>
><br>
><br>
</div></div>--<br>
<div class="Ih2E3d">Claudio Ciccani<br>
<a href="mailto:klan@users.sf.net">klan@users.sf.net</a><br>
</div><a href="mailto:klan@directfb.org">klan@directfb.org</a><br>
<a href="http://directfb.org" target="_blank">http://directfb.org</a><br>
</blockquote></div>Great, the patch works like a charm. I hope that it will bw accepted by D3D gurus and Alexandre .<br><br>David<br>