Ticket #10929 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

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


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:

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

comment:1 Changed 2 years ago by misha

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

comment:2 Changed 2 years ago by misha

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 Changed 2 years ago by misha

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.

comment:4 Changed 2 years ago by elupus

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 Changed 2 years ago by misha

  • Summary changed from WinD3D: DrawIndexedPrimitiveUP calulate vertices in an invalid way to WinD3D: DrawIndexedPrimitiveUP calulate vertices in an invalid way ==> fixed in SVN

Great to hear, thanks for the feedback!

comment:6 Changed 2 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 4.2.2.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use