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