https://bugs.winehq.org/show_bug.cgi?id=54299
Bug ID: 54299 Summary: d3d12:d3d12 - test_create_device() gets an unexpected 0 refcount on Windows 10 1909+ Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: d3d Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
d3d12:d3d12 - test_create_device() gets an unexpected 0 refcount on Windows 10 1909+:
d3d12.c:888: Test failed: Got unexpected refcount 0.
See https://test.winehq.org/data/patterns.html#d3d12:d3d12
This test * is skipped on Windows 10 < 1709, * succeeds on Windows 10 1709 and 1809, * and fails on Windows 10 1909+ because the refcount is 0.
The test seems unsure about the exact refcount value since it only tests for "refcount >= 1".
Maybe it should be something like "refcount == 0 || broken(refcount >= 1)", possibly with a todo_wine? Or that test could just be removed entirely?
https://bugs.winehq.org/show_bug.cgi?id=54299
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase CC| |jsikorski@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=54299
--- Comment #1 from François Gouget fgouget@codeweavers.com --- I sent an MR for the broken() approach: https://gitlab.winehq.org/wine/wine/-/merge_requests/1965
https://bugs.winehq.org/show_bug.cgi?id=54299
--- Comment #2 from Henri Verbeet hverbeet@gmail.com --- (In reply to François Gouget from comment #0)
The test seems unsure about the exact refcount value since it only tests for "refcount >= 1".
The point of the test is to test that the device keeps a reference to the adapter. However, it would be entirely plausible for e.g. the driver to keep some additional references to the adapter.
Note that the adapter can later be retrieved from (ultimately) the device; one such way is demonstrated a bit further down in the same test. It's possible of course that in later versions of Direct3D 12 things changed in such a way that the device no longer keeps a direct reference to the adapter interface, but instead references it by e.g. its LUID. (And then retrieves a new instance from the DXGI factory when needed.) In that case we'd probably simply want to remove this refcount test.
https://bugs.winehq.org/show_bug.cgi?id=54299
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |9b38ae997f6a5920694a5c97ff6 | |01827336b0575 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #3 from François Gouget fgouget@codeweavers.com --- This is fixed:
commit 9b38ae997f6a5920694a5c97ff601827336b0575 Author: François Gouget fgouget@codeweavers.com AuthorDate: Fri Jan 13 16:07:49 2023 +0100
d3d12/tests: Don't check the refcount after releasing the dxgi adapter.
The refcount is >= 1 on Windows 10 1709 and 1809 but 0 on more recent versions. So its value is not really important.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54299
https://bugs.winehq.org/show_bug.cgi?id=54299
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.4.