D3D12info>3.5.1 Doesn't Work Via Wine (so Can't Report D3DMetal And VKD3D Via D3D12infoGUI App)

by ADMIN 96 views

D3D12info>3.5.1 Doesn't Work via Wine: A Solution to Enable D3DMetal and VKD3D Reporting

D3D12info is a powerful tool for debugging and analyzing Direct3D 12 applications. However, recent versions of D3D12info have been experiencing issues when run under Wine on Linux and Mac OS. In this article, we will explore the problem and propose a solution to enable D3DMetal and VKD3D reporting on these platforms.

The issue arises when trying to load DXGI and D3D12 libraries using the LoadLibraries() function in D3D12info. The error message "Could not load DXGI & D3D12 libraries" is displayed, preventing the application from functioning correctly. This problem is specific to Wine and has been observed on both Linux and Mac OS.

After analyzing the code, it appears that the problem lies in the LoadLibraries() function, specifically in the call to D3D12GetInterface(). This function is a stub in Wine and has been so for over two years. The code checks if the g_D3D12GetInterface variable is null, and if so, returns false. However, this check is not necessary and can be removed to enable D3D12info to work under Wine.

To fix the issue, we can modify the LoadLibraries() function to defer the loading and checking of the D3D12GetInterface entrypoint until the PrintDirectSR function is called. This will allow D3D12info to work under Wine without requiring any changes to the Wine implementation.

Here is the modified code:

if(!g_D3D12GetInterface)
{
    //return false;
}

By removing the check, we can enable D3D12info to work under Wine, allowing users to send D3DMetal and VKD3D reports from Linux and Mac OS.

In addition to the issue with D3D12info, there appears to be another problem with the D3D12infoGUI application. When using the latest build of the GUI (version 1.4.0) with a D3D12info version older than 3.6.0, the application fails to send reports when clicking the "Send" button on Mac OS. This issue is likely related to the fact that the D3D12infoGUI application is not accepting reports from older versions of D3D12info.

In conclusion, the issue with D3D12info not working under Wine is due to the stub implementation of the D3D12GetInterface entrypoint in Wine. By modifying the LoadLibraries() function to defer the loading and checking of this entrypoint, we can enable D3D12info to work under Wine. Additionally, we have identified an issue with the D3D12infoGUI application that prevents it from sending reports from older versions of D3D12info.

  1. Defer the loading and checking of the D3D12GetInterface entrypoint until the PrintDirectSR function is called.
  2. Open a Wine issue to request implementation of the D3D12GetInterface entrypoint instead of a stub.
  3. Update the D3D12infoGUI application to accept reports from older versions of D3D12info.

By following these recommendations, we can enable D3D12info to work under Wine and provide a better experience for users.
D3D12info>3.5.1 Doesn't Work via Wine: A Solution to Enable D3DMetal and VKD3D Reporting

Q&A: Frequently Asked Questions about D3D12info and Wine

A: The issue arises when trying to load DXGI and D3D12 libraries using the LoadLibraries() function in D3D12info. The error message "Could not load DXGI & D3D12 libraries" is displayed, preventing the application from functioning correctly.

A: The issue is specific to Wine because the D3D12GetInterface entrypoint is a stub in Wine and has been so for over two years. This stub implementation prevents D3D12info from loading the necessary libraries.

A: The proposed solution is to modify the LoadLibraries() function to defer the loading and checking of the D3D12GetInterface entrypoint until the PrintDirectSR function is called. This will allow D3D12info to work under Wine without requiring any changes to the Wine implementation.

A: No, this solution will not affect the functionality of D3D12info. The modification to the LoadLibraries() function is a simple change that will not impact the overall functionality of the application.

A: The issue with D3D12infoGUI is that it fails to send reports when using a D3D12info version older than 3.6.0. This is likely due to the fact that the D3D12infoGUI application is not accepting reports from older versions of D3D12info.

A: To update D3D12infoGUI to accept reports from older versions, you will need to modify the application to check the version of D3D12info being used and accept reports from older versions if necessary.

A: Yes, you can open a Wine issue to request implementation of the D3D12GetInterface entrypoint. This will help to ensure that D3D12info works correctly under Wine in the future.

A: The benefits of enabling D3D12info to work under Wine include the ability to send D3DMetal and VKD3D reports from Linux and Mac OS, which will provide valuable insights into the performance and functionality of these applications.

In conclusion, the issue with D3D12info not working under Wine is due to the stub implementation of the D3D12GetInterface entrypoint in Wine. By modifying the LoadLibraries() function to defer the loading and checking of this entrypoint, we can enable D3D12info to work under Wine., we have identified an issue with the D3D12infoGUI application that prevents it from sending reports from older versions of D3D12info. By following the recommendations outlined in this article, we can enable D3D12info to work under Wine and provide a better experience for users.