build: Explicitly disable experimental Direct3D 12 adaptation for Windows #27

Manually merged
hebasto merged 1 commit from 210828-d3d12 into main 2021-08-30 07:36:56 +00:00 AGit
hebasto commented 2021-08-28 12:05:52 +00:00 (Migrated from github.com)

The Direct3D 12 adaptation is an alternative renderer for Qt Quick 2 when running on Windows, both for Win32 and UWP applications.

Currently, being enabled it causes an error in Guix build for the x86_64-w64-mingw32 host (https://github.com/bitcoin-core/gui-qml/issues/26#issuecomment-907603402).

This PR explicitly disables the Direct3D 12 adaptation for Windows.

Please note that D3D12 backend of Qt Quick has been removed in Qt 6 (https://bugreports.qt.io/browse/QTBUG-79925).

Guix build:

$ env HOSTS='x86_64-w64-mingw32' ./contrib/guix/guix-build
$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
00bd2214012476a91e32cddc720ef3ba12dcd992c0fea4f656f8e1ca672b1768  guix-build-bd86bb536645/output/dist-archive/bitcoin-bd86bb536645.tar.gz
1f2f80002f6bda09073f3da6b292d232e1c657ecf1e6f0c59ac01b1f5d3dd474  guix-build-bd86bb536645/output/x86_64-w64-mingw32/SHA256SUMS.part
b988b0ce195f536799b30194f573a0ae0d26a32b00c1a5b54039d62e60f92db9  guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win-unsigned.tar.gz
e89793b517eb171ecf0668f5f004af2df43077614f2cb22e0eb9af736b51dc80  guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64-debug.zip
ccc6fc78cf0de61772bab59a83b2370aa825bd5c6d0af126b19c02f985b04fda  guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64-setup-unsigned.exe
d753a67e614ad33d6c07e8e32183feec81dee0edd51f319e9bea698c985cf0b6  guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64.zip

Closes #26.

The Direct3D 12 adaptation is an alternative renderer for Qt Quick 2 when running on Windows, both for Win32 and UWP applications. Currently, being enabled it causes an error in Guix build for the `x86_64-w64-mingw32` host (https://github.com/bitcoin-core/gui-qml/issues/26#issuecomment-907603402). This PR explicitly disables the [Direct3D 12 adaptation for Windows](https://doc.qt.io/qt-5.12//qtquick-visualcanvas-adaptations-d3d12.html). Please note that D3D12 backend of Qt Quick has been removed in Qt 6 (https://bugreports.qt.io/browse/QTBUG-79925). #### Guix build: ``` $ env HOSTS='x86_64-w64-mingw32' ./contrib/guix/guix-build $ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum 00bd2214012476a91e32cddc720ef3ba12dcd992c0fea4f656f8e1ca672b1768 guix-build-bd86bb536645/output/dist-archive/bitcoin-bd86bb536645.tar.gz 1f2f80002f6bda09073f3da6b292d232e1c657ecf1e6f0c59ac01b1f5d3dd474 guix-build-bd86bb536645/output/x86_64-w64-mingw32/SHA256SUMS.part b988b0ce195f536799b30194f573a0ae0d26a32b00c1a5b54039d62e60f92db9 guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win-unsigned.tar.gz e89793b517eb171ecf0668f5f004af2df43077614f2cb22e0eb9af736b51dc80 guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64-debug.zip ccc6fc78cf0de61772bab59a83b2370aa825bd5c6d0af126b19c02f985b04fda guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64-setup-unsigned.exe d753a67e614ad33d6c07e8e32183feec81dee0edd51f319e9bea698c985cf0b6 guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64.zip ``` Closes #26.
promag commented 2021-08-29 11:44:19 +00:00 (Migrated from github.com)

If opengl and d3d are disabled then what is used by the renderer?

If opengl and d3d are disabled then what is used by the renderer?
hebasto commented 2021-08-29 14:46:55 +00:00 (Migrated from github.com)

@promag

If opengl and d3d are disabled then what is used by the renderer?

I've verified on Windows 10 Pro 20H2 (build 19042.1165).

Indeed, Qt Quick uses 2D Renderer, i.e., "software".


To clarify, this PR does not drop Windows build with D3D12 support. Such a build is not available due to the QTBUG-86892.

And adding OpenGL/ANGLE support to Windows build is out of this PR scope, but it is nice for a follow up, no?

@promag > If opengl and d3d are disabled then what is used by the renderer? I've verified on Windows 10 Pro 20H2 (build 19042.1165). Indeed, Qt Quick uses [2D Renderer](https://doc.qt.io/qt-5.12/qsgrendererinterface.html#GraphicsApi-enum), i.e., "software". --- To clarify, this PR does not drop Windows build with D3D12 support. Such a build is not available due to the [QTBUG-86892](https://bugreports.qt.io/browse/QTBUG-86892). And adding OpenGL/ANGLE support to Windows build is out of this PR scope, but it is nice for a follow up, no?
hebasto commented 2021-08-29 15:47:22 +00:00 (Migrated from github.com)
Btw, on the main branch: https://github.com/bitcoin-core/gui-qml/blob/c25812f833ad664ad140d0a66f3add527559d68c/depends/packages/qt.mk#L155
jarolrod commented 2021-08-29 21:12:17 +00:00 (Migrated from github.com)

GUIX hashes mine match @hebasto:

find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum

00bd2214012476a91e32cddc720ef3ba12dcd992c0fea4f656f8e1ca672b1768  guix-build-bd86bb536645/output/dist-archive/bitcoin-bd86bb536645.tar.gz
1f2f80002f6bda09073f3da6b292d232e1c657ecf1e6f0c59ac01b1f5d3dd474  guix-build-bd86bb536645/output/x86_64-w64-mingw32/SHA256SUMS.part
b988b0ce195f536799b30194f573a0ae0d26a32b00c1a5b54039d62e60f92db9  guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win-unsigned.tar.gz
e89793b517eb171ecf0668f5f004af2df43077614f2cb22e0eb9af736b51dc80  guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64-debug.zip
ccc6fc78cf0de61772bab59a83b2370aa825bd5c6d0af126b19c02f985b04fda  guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64-setup-unsigned.exe
d753a67e614ad33d6c07e8e32183feec81dee0edd51f319e9bea698c985cf0b6  guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64.zip
GUIX hashes mine match @hebasto: ``` diff find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum 00bd2214012476a91e32cddc720ef3ba12dcd992c0fea4f656f8e1ca672b1768 guix-build-bd86bb536645/output/dist-archive/bitcoin-bd86bb536645.tar.gz 1f2f80002f6bda09073f3da6b292d232e1c657ecf1e6f0c59ac01b1f5d3dd474 guix-build-bd86bb536645/output/x86_64-w64-mingw32/SHA256SUMS.part b988b0ce195f536799b30194f573a0ae0d26a32b00c1a5b54039d62e60f92db9 guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win-unsigned.tar.gz e89793b517eb171ecf0668f5f004af2df43077614f2cb22e0eb9af736b51dc80 guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64-debug.zip ccc6fc78cf0de61772bab59a83b2370aa825bd5c6d0af126b19c02f985b04fda guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64-setup-unsigned.exe d753a67e614ad33d6c07e8e32183feec81dee0edd51f319e9bea698c985cf0b6 guix-build-bd86bb536645/output/x86_64-w64-mingw32/bitcoin-bd86bb536645-win64.zip ```
jarolrod commented 2021-08-29 21:14:24 +00:00 (Migrated from github.com)

If opengl and d3d are disabled then what is used by the renderer?

And adding OpenGL/ANGLE support to Windows build is out of this PR scope, but it is nice for a follow up, no?

Adding support for guix building with non-cpu centric rendering support enabled is going to be required as the limitiation and performance impacts of this rendering engine will limit what we can do with this project, see:

  1. https://doc.qt.io/QtQuick2DRenderer/qtquick2drenderer-limitations.html
  2. https://doc.qt.io/QtQuick2DRenderer/qtquick2drenderer-performance.html
> If opengl and d3d are disabled then what is used by the renderer? > And adding OpenGL/ANGLE support to Windows build is out of this PR scope, but it is nice for a follow up, no? Adding support for guix building with non-cpu centric rendering support enabled is going to be required as the limitiation and performance impacts of this rendering engine will limit what we can do with this project, see: 1) https://doc.qt.io/QtQuick2DRenderer/qtquick2drenderer-limitations.html 2) https://doc.qt.io/QtQuick2DRenderer/qtquick2drenderer-performance.html
jarolrod (Migrated from github.com) reviewed 2021-08-29 21:23:24 +00:00
jarolrod (Migrated from github.com) left a comment

ACK bd86bb5366

Confirmed that guix building for windows is broken on master and that this PR fixes that and allows me to build. This is an intermediary step, see here for why it is required to add proper rendering support while guix building.

ACK bd86bb53664579bb8558bff523351fe4344dbd8f Confirmed that guix building for windows is broken on master and that this PR fixes that and allows me to build. This is an intermediary step, see [here](bd86bb53664579bb8558bff523351fe4344dbd8f) for why it is required to add proper rendering support while guix building.
hebasto commented 2021-08-30 07:30:28 +00:00 (Migrated from github.com)

Btw, from Qt 5.14 onwards, we can use the Qt Rendering Hardware Interface (RHI).

Btw, from Qt 5.14 onwards, we can use the Qt Rendering Hardware Interface (RHI).
Sign in to join this conversation.
No description provided.