protonscr

How to perform unit testing for DXVK?

dxvkclosed question
doitsujin/dxvk#4637 · opened 2025-01-23 by levinac · updated 2025-02-07 · 5 comments · github
Llevinac 2025-01-23 github
KK0bin maintainer 2025-01-23 github

We don't really have unit tests. it's possible to run the Wine D3D9 - D3D11 tests with DXVK but it's not a focus of us to make sure DXVK passes every one of those and right now it doesn't.

Llevinac 2025-01-23 github

So how can we ensure that the changes are correct? Does dxvk promote project development by adapting applications?

BBlisto91 2025-01-23 github

Work is mostly verified by just testing various games

WWinterSnowfall 2025-01-23 github

Additionally, several test applications have been written to verify the correctness of certain features implemented in dxvk, see: https://github.com/doitsujin/dxvk-tests and https://github.com/WinterSnowfall/d8vk-tests . This has generally been done for behavior that can't be directly observed or otherwise determined by game testing.

But for a more complete coverage of the D3D APIs, I'd look at the Wine tests for those specific modules.

Keep in mind that, as @K0bin mentioned, it's less important to us if we break or bend certain tests should that help games behave properly or even perform better sometimes.

With graphics APIs that have historically covered many generations of OSes and graphics hardware, such as D3D9, it's somewhat of a challenge to accurately model expected behavior even in unit tests. With but a quick glance at Wine's D3D9 tests one can see tests that are marked as broken in certain situations, or are littered with exceptions.

it's not a focus of us to make sure DXVK passes every one of those and right now it doesn't.

Not even WineD3D passes everything at all times, for what it's worth :). But they do seem to check out against their respective native implementations, so I'd call them technically accurate and a good start for anyone looking for an extensive battery of D3D unit tests.

KK0bin maintainer 2025-01-23 github

Not even WineD3D passes everything at all times, for what it's worth :)

Windows doesn't either if I recall correctly...

Nothing extracted yet.