Skip to content
Snippets Groups Projects

tests: Support using the Agility SDK in crosstests.

Merged Giovanni Mascellani requested to merge giomasce/vkd3d:vesuvio into master
3 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Giovanni Mascellani approved this merge request

    approved this merge request

    • +Traditionally Microsft has released the Direct3D 12 development files,
      +including the debug layer runtime, as part of the larger Windows
      +SDK. Starting from 2021 they introduced the DirectX 12 Agility SDK,
      +which can be updated independently of the Windows SDK. If you plan to
      +run the vkd3d crosstests with Microsoft's debug layer you might want
      +to get it from the Agility SDK, both because it's probably going to be
      +more up-to-date and because the Agility SDK is a couple dozens of
      +megabytes versus the gigabytes of the Windows SDK.
      +
      +Running an application with the Agility SDK requires a little change
      +which for vkd3d must be manually enabled at configuration time. The
      +setup procedure goes as it follows:

      Does the debug runtime that comes with the Agility SDK require using the rest of the Agility SDK? IIRC the debug runtime used to be a reasonably independent component.

    • Does the debug runtime that comes with the Agility SDK require using the rest of the Agility SDK? IIRC the debug runtime used to be a reasonably independent component.

      AFAICT there are only two situations:

      • If I define the two magical exports (D3D12SDKPath and D3D12SDKVersion), then D3D12 will want to load d3d12core.dll (and d3d12sdklayers.dll if the debug runtime is requested) from the Agility SDK using the provided path, and fail if it cannot find the appropriate DLLs or they don't have the right version.
      • If I don't define the magical exports, then the system-provided DLLs are used and I have no way to tell it to use the debug runtime from the Agility SDK; it is ignored even if it's in the same directory as the executable.

      FTR, I use print_dll_version() to decide what was loaded, with an unqualified DLL name. If the version begins with 10.0 then it's from the OS, if it begins with 1.613 it's from the Agility SDK.

      So I couldn't come up with any way to do what you're saying.

    • Please register or sign in to reply
  • Conor McCarthy
    Conor McCarthy @cmccarthy started a thread on commit 73bc1665
310 355 if (adapter)
311 356 IUnknown_Release(adapter);
312 357
358 if (SUCCEEDED(hr) && test_options.enable_debug_layer)
359 {
360 ID3D12InfoQueue1 *info_queue;
361 DWORD cookie;
362
363 hr = ID3D12Device_QueryInterface(device, &IID_ID3D12InfoQueue1, (void **)&info_queue);
  • This fails on my old Windows 10 RX 580 box, with updated drivers. I can find no info on which OS version supports ID3D12InfoQueue1, but it looks like Windows 11 is required.

  • I would have assumed that depended on the debug layer runtime rather than on the driver. Are you using the debug layer from the Agility SDK?

    At any rate, I'll change the patch so that failure here is not a test failure but just a warning message. Since you already had a patch to fetch messages with ID3D12InfoQueue you can submit another patch to use that if ID3D12InfoQueue1 is not available.

    Edited by Giovanni Mascellani
  • I have the two DLLs from Agility version 613 in the same directory as the d3d12 crosstests. I would not expect Agility SDK to implement the ID3D12Device, but I'm not sure how the querying relates to the driver and Windows version. But yeah, I will raise an MR for a fallback.

  • I would have assumed that whatever directly implements ID3D12Device only provides a dispatch layer, behind which the D3D12 runtime, the driver and the debug runtime juggle calls to each other. So I still expect that it might work with the Agility SDK. Notice that it's not enough to have the Agility SDK DLLs in the same directory, you also have to pass a compilation flag (see the documentation). And you can tell whether in the end you're using the system-provided D3D12 or the one from the Agility SDK by the version number of d3d12core.dll.

  • Please register or sign in to reply
  • Conor McCarthy approved this merge request

    approved this merge request

  • added 2 commits

    • a148d00a - tests: Enable the D3D12 debug layer callbacks.
    • 896ea9a6 - tests: Support using the Agility SDK in crosstests.

    Compare with previous version

  • added 40 commits

    • 896ea9a6...4b3a948e - 37 commits from branch wine:master
    • bccb34e4 - tests: Improve feedback when enabling D3D12 debug layers.
    • e2b2689c - tests: Enable the D3D12 debug layer callbacks.
    • 5a41f800 - tests: Support using the Agility SDK in crosstests.

    Compare with previous version

  • added 75 commits

    • 5a41f800...f090d1e8 - 72 commits from branch wine:master
    • 782a6b7e - tests: Improve feedback when enabling D3D12 debug layers.
    • 5b2a7761 - tests: Enable the D3D12 debug layer callbacks.
    • e6c4f825 - tests: Support using the Agility SDK in crosstests.

    Compare with previous version

  • added 58 commits

    • e6c4f825...d3ba810c - 55 commits from branch wine:master
    • fef4732c - tests: Improve feedback when enabling D3D12 debug layers.
    • 7bb83cc7 - tests: Enable the D3D12 debug layer callbacks.
    • 59d26a0d - tests: Support using the Agility SDK in crosstests.

    Compare with previous version

    • For what it's worth, the first two commits seems fine to me, and I'd take those on their own as well. I'm less sold on 3/3, but don't just want to say "no" either.

    • I think that 3/3 is going to be pretty useful in the future, if we want start implementing newer features. And it's unlikely to cause a lot of damage.

    • Please register or sign in to reply
  • Henri Verbeet approved this merge request

    approved this merge request

  • Henri Verbeet added 41 commits

    added 41 commits

    • 59d26a0d...3dc43e89 - 38 commits from branch wine:master
    • e3ddb76a - tests: Improve feedback when enabling d3d12 debug layers.
    • c49daadc - tests: Enable the d3d12 debug layer message callbacks.
    • 4f67675a - tests: Support using the Agility SDK in the crosstests.

    Compare with previous version

  • Please register or sign in to reply
    Loading