[PATCH] ddraw: Allow GPU access to D3DVBCAPS_SYSTEMMEMORY vertex buffers.

Matteo Bruni matteo.mystral at gmail.com
Mon Oct 15 12:08:28 CDT 2018


On Mon, Oct 15, 2018 at 5:42 PM Henri Verbeet <hverbeet at gmail.com> wrote:
>
> On Mon, 15 Oct 2018 at 18:33, Matteo Bruni <mbruni at codeweavers.com> wrote:
> > The original Deus Ex uses a D3DVBCAPS_SYSTEMMEMORY buffer with
> > DrawPrimitiveVB() and expects it to work.
> >
> > It should also help with bug 45279 and 45486.
> >
> > The device is probably created with
> > D3DCREATE_SOFTWARE_VERTEXPROCESSING, which would explain why this is
> > accepted on Windows. With core profile we need to create a VBO anyway
> > so I think this is the correct fix in practice.
> >
> > This is an alternative to
> > https://source.winehq.org/patches/data/152581, main difference is
> > fixing the issue in ddraw instead of wined3d.
> >
> This is probably fine, but note that one other alternative would be to
> implement DrawPrimitiveVB() calls with SYSTEMMEMORY buffers on top of
> regular DrawPrimitive(). The main advantage of that would be that we'd
> only impose a penalty on applications that actually do draws like
> that, and we'd avoid issues with applications doing small draws from
> large/huge SYSTEMMEMORY buffers.

I like the idea. I guess DrawIndexedPrimitiveVB() would also need
something like this, unless that's not allowed for whatever reason.
I'll write some tests.



More information about the wine-devel mailing list