Ticket #10929 (closed defect: fixed)
WinD3D: DrawIndexedPrimitiveUP calulate vertices in an invalid way ==> fixed in SVN
|Reported by:||elupus||Owned by:|
While trying out XBMC on a virtualized windows system, I get exceptions trying to call DrawIndexedPrimitiveUP.
After some detective work I've tracked it down to the following likely culprit: http://permalink.gmane.org/gmane.comp.emulators.wine.patches/64899
There is no relation between number of vertices passed and number of elements drawn when you do a indexed draw. The index buffer is what defines what vertices to use, so it is entirely wrong to assume the number of vertices available can be calculated from the primitive count.
I couldn't find a reason for that commit, but it seem to have been put into virtualbox's wined3d implementation too.
We (xbmc) use the this type of draw to translate from a vertex buffer that contain quads to a D3DPT_TRIANGLELIST. Thus in our case Vertices = Primitives * 3 / 6 * 4 (each quad of 4 vertices ends up as two triangles of 6 vertices).
- Summary changed from WinD3D: DrawIndexedPrimitiveUP calulate vertices in an invalid way to WinD3D: DrawIndexedPrimitiveUP calulate vertices in an invalid way ==> fixed in SVN