Browse Source

Update D3D12 build instructions.

bruvzg 1 year ago
parent
commit
95a47f3edb
1 changed files with 17 additions and 3 deletions
  1. 17 3
      contributing/development/compiling/compiling_for_windows.rst

+ 17 - 3
contributing/development/compiling/compiling_for_windows.rst

@@ -170,9 +170,6 @@ API.
 
 
 To compile Godot with Direct3D 12 support you need at least the following:
 To compile Godot with Direct3D 12 support you need at least the following:
 
 
-- Visual Studio (follow the instructions above to install). Currently, we don't
-  support building with Direct3D 12 enabled when using MinGW. Support will be
-  added in the future if possible.
 - `The DirectX Shader Compiler <https://github.com/Microsoft/DirectXShaderCompiler/releases>`_.
 - `The DirectX Shader Compiler <https://github.com/Microsoft/DirectXShaderCompiler/releases>`_.
   The zip folder will be named "dxc\_" followed by the date of release. Download
   The zip folder will be named "dxc\_" followed by the date of release. Download
   it anywhere, unzip it and remember the path to the unzipped folder, you will
   it anywhere, unzip it and remember the path to the unzipped folder, you will
@@ -195,6 +192,12 @@ To compile Godot with Direct3D 12 support you need at least the following:
               ./update_mesa.sh
               ./update_mesa.sh
               scons
               scons
 
 
+             If you are buildng with MinGW, add ``use_mingw=yes`` to the ``scons``
+             command, you can also specify build architecture using ``arch={architecture}``.
+             
+             Mesa static library should be built using the same compiler you are
+             using for building Godot.
+
 Optionally, you can compile with the following for additional features:
 Optionally, you can compile with the following for additional features:
 
 
 - `PIX <https://devblogs.microsoft.com/pix/download>`_ is a performance tuning
 - `PIX <https://devblogs.microsoft.com/pix/download>`_ is a performance tuning
@@ -214,6 +217,17 @@ Optionally, you can compile with the following for additional features:
 .. note:: If you use a preview version of the Agility SDK, remember to enable
 .. note:: If you use a preview version of the Agility SDK, remember to enable
           developer mode in Windows; otherwise it won't be used.
           developer mode in Windows; otherwise it won't be used.
 
 
+.. note:: If you want to use a PIX with MinGW build, navigate to PIX runtime
+          directory and use the following commands to generate import library::
+
+            # For x86-64:
+            gendef ./bin/x64/WinPixEventRuntime.dll
+            dlltool --machine i386:x86-64 --no-leading-underscore -d WinPixEventRuntime.def -D WinPixEventRuntime.dll -l ./bin/x64/libWinPixEventRuntime.a
+
+            # For ARM64:
+            gendef ./bin/ARM64/WinPixEventRuntime.dll
+            dlltool --machine arm64 --no-leading-underscore -d WinPixEventRuntime.def -D WinPixEventRuntime.dll -l ./bin/ARM64/libWinPixEventRuntime.a
+
 When building Godot, you will need to tell SCons to use Direct3D 12 and where to
 When building Godot, you will need to tell SCons to use Direct3D 12 and where to
 look for the additional libraries::
 look for the additional libraries::