D3D12 Reference/Software/WARP device?

Started by
6 comments, last by SoldierOfLight 7 years, 11 months ago

Hi guys!

I've failed to find how to create Reference/Software/WARP devices for Direct3D 12 (not 11).

D3D12CreateDevice misses the D3D_DRIVER_TYPE argument from D3D11CreateDevice, so we there's no way to specify D3D_DRIVER_TYPE_REFERENCE or D3D_DRIVER_TYPE_WARP. The documentation on WARP itself still only mentions D3D11 and lower.

Am I missing something in the docs or is there really no reference software implementation? Thanks!

Advertisement

Hi, you have to retrieve a WARP adapter using IDXGIFactory4::EnumWarpAdapter(), then pass the warp adapter to D3D12CreateDevice(). Remember that WARP adapter does not support full-screen mode.

EDIT: do not use a DXGI adapter with DXGI_ADAPTER_FLAG_SOFTWARE flag retrieved with IDXGIFactory::EnumAdapters() or IDXGIFactory1::EnumAdapters1().

"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/

Thank you Alessio, this is exactly what I've failed to find! Your answer will become a pointer to how do it :)

Sounds like the name "WARP" has been scrapped in D3D12 but a "SOFTWARE" instead.

Sounds like the name "WARP" has been scrapped in D3D12 but a "SOFTWARE" instead.

As Alessio pointed out, the function is called "EnumWarpAdapter", so it's still very much called WARP.

Adam Miles - Principal Software Development Engineer - Microsoft Xbox Advanced Technology Group

You can also force warp in the control panel if you're too lazy to modify a few lines of code like me.

Sounds like the name "WARP" has been scrapped in D3D12 but a "SOFTWARE" instead.

As Alessio pointed out, the function is called "EnumWarpAdapter", so it's still very much called WARP.

Oh, what's the SOFTWARE device mean then? A extremely slow simulation solution?

SOFTWARE means you provide your own software driver implementation. It's an incredibly complicated concept, and is how REF and the original WARP were implemented under the covers. It has since been abandoned, though I'm not sure if deprecated is the right word for it.

This topic is closed to new replies.

Advertisement