Skip to content

Update D3D12 build instructions. #8624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions contributing/development/compiling/compiling_for_windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ API.

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 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
Expand All @@ -195,6 +192,12 @@ To compile Godot with Direct3D 12 support you need at least the following:
./update_mesa.sh
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:

- `PIX <https://devblogs.microsoft.com/pix/download>`_ is a performance tuning
Expand All @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should 'preview' be 'previous'?
"If you use a previous version..."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. If you check https://devblogs.microsoft.com/directx/directx12agility/, you'll see that they release preview versions, which are like betas of upcoming releases. This sentence is about them.

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
look for the additional libraries::

Expand Down