VirtualBox

Opened 12 years ago

Closed 11 years ago

#10929 closed defect (fixed)

WinD3D: DrawIndexedPrimitiveUP calulate vertices in an invalid way ==> fixed in SVN

Reported by: elupus Owned by:
Component: 3D support Version: VirtualBox 4.2.0
Keywords: Cc:
Guest type: other Host type: other

Description

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).

Change History (6)

comment:1 by misha, 12 years ago

Thanks for the info. We'll try to reproduce the issue with the latest XBMC and see how we can fix this.

comment:2 by misha, 12 years ago

We have fixed some issues in our WDDM 3D Video driver implementation, and I now see the XBMC 11.0 working OK on Win7_32 Guest.
The issues were not related to WineD3D code though.
Did you see XBMC rendering issues with WDDM or XPDM (aka "Basic D3D support") driver installed in your guest system?

comment:3 by misha, 12 years ago

Since I've got not response, I will assume you're running WDDM Guest drivers.
In this case, please try the following test build. XBMC is working OK with it for me under VBox WDDM Guest Video Driver.
http://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.2.1-80863.iso

comment:4 by elupus, 11 years ago

I was just poking through device.c in virtualbox repo to see if anything had been done, only to see that it was rather different from the code i mentioned, came here to update ticket only to see the responses.

It's weird that i didn't get any mail notice on it.

Anyway I was running the WDDM driver, and I'm pleased to report that 4.2.1 have solved it. Very very nice. Ticked can be closed.

comment:5 by misha, 11 years ago

Summary: WinD3D: DrawIndexedPrimitiveUP calulate vertices in an invalid wayWinD3D: DrawIndexedPrimitiveUP calulate vertices in an invalid way ==> fixed in SVN

Great to hear, thanks for the feedback!

comment:6 by Frank Mehnert, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in 4.2.2.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use