[PATCH] d3d9: CreateDevice() requires a valid window to be passed in.

Jeff Smith whydoubt at gmail.com
Thu Sep 10 18:59:19 CDT 2020


[RFC]

I am working on expanding the tests, but am wondering which
device types I really need to target.  In rough order of which
ones I would consider important:

D3DDEVTYPE_HAL
 - obviously
D3DDEVTYPE_NULLREF
 - as Stefan mentioned, seems important not to break this
 - allows creating a window-less device
D3DDEVTYPE_SW
 - CreateDevice always returns D3DERR_INVALIDCALL
 - not that interesting, but would be simple to implement.
 - If we wanted to support registering software devices it would be
    more important.
D3DDEVTYPE_REF
 - CreateDevice generally returns D3DERR_NOTAVAILABLE
 - Has some quirks that make it harder to implement.
 - As I understand, this would behave differently on Windows
    systems with d3dref9.dll installed.

I'm thinking of testing and correcting the first three, but if
someone has a strong sense that it should be otherwise,
it would be great to know sooner rather than later.

Thanks,
Jeff

On Wed, Sep 9, 2020 at 12:54 PM Jeff Smith <whydoubt at gmail.com> wrote:
>
> On Tue, Sep 8, 2020 at 5:50 AM Stefan Dösinger
> <stefandoesinger at gmail.com> wrote:
> >
> > Am 08.09.20 um 09:02 schrieb Jeff Smith:
> > > +    hr = IDirect3D9_CreateDevice(d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, NULL,
> > > +            behavior_flags, &present_parameters, &device);
> >
> > Is this true of all device types? In particular, also NULLREF? I think
> > WPF creates NULLREF devices with NULL windows, although I am not sure
> > what for...
>
> Yes, it does appear that CreateDevice with other D3DDEVTYPEs does
> behave differently,
> particularly NULLREF.  I am trying to improve the tests and solution,
> but am running into a
> bug with NULLREF that is causing it to fail on some platforms but not others.
>
> Thanks,
> Jeff



More information about the wine-devel mailing list