Skip to content
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

build: Enable OpenGL for qt as Qt Quick relies on it #33

Merged
merged 4 commits into from
Jun 16, 2022

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Aug 30, 2021

Software renderer has limitations. Therefore, it'd better to avoid it.

Usability feedback collected in #126:

I observed considerable improvements with using OpenGL Rendering over 2-D Rendering.

There is a huge difference, as expected.


Guix builds:

$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
0ab9d27f38b042a2b76c54115976381998932e21a14c9705bf1b5bb1ce9b0623  guix-build-745c797a64ba/output/aarch64-linux-gnu/SHA256SUMS.part
456b6bf902711aeeecb2ea107f3ef5ef55eae13ba404f86f9b45e7a18ec4b7cd  guix-build-745c797a64ba/output/aarch64-linux-gnu/bitcoin-745c797a64ba-aarch64-linux-gnu-debug.tar.gz
3ae2b6a95d03df60eb910c39978539aa791b9d74291955ea83f75daf0db25dec  guix-build-745c797a64ba/output/aarch64-linux-gnu/bitcoin-745c797a64ba-aarch64-linux-gnu.tar.gz
42e7379ac9f4f6a0f805cbca00da9fc2b9f33b9a374dfa7f0c9fc01d6bc9e072  guix-build-745c797a64ba/output/arm-linux-gnueabihf/SHA256SUMS.part
18cbf0619483fcb1a550cf7e66944bf2779e8af129c6f5d4cc256bcc8f658e6f  guix-build-745c797a64ba/output/arm-linux-gnueabihf/bitcoin-745c797a64ba-arm-linux-gnueabihf-debug.tar.gz
f5aab05ed5be4d0955dd33cbfec5e1bfe8e943751c8495b93cd1d2c5ec343f91  guix-build-745c797a64ba/output/arm-linux-gnueabihf/bitcoin-745c797a64ba-arm-linux-gnueabihf.tar.gz
375a2981a1721a937a260992c76978d220a554d65da3aca6805f33b2bdd101f8  guix-build-745c797a64ba/output/arm64-apple-darwin/SHA256SUMS.part
b5e2336c669efbc3ca7782e7a0b7cf94ee9047e6b02c2fc6304393b9e9019f2f  guix-build-745c797a64ba/output/arm64-apple-darwin/bitcoin-745c797a64ba-arm64-apple-darwin-unsigned.dmg
8d1c2e3680ce4902cd2e6798709f44193682c00225e9b9d049ac7401bafbb711  guix-build-745c797a64ba/output/arm64-apple-darwin/bitcoin-745c797a64ba-arm64-apple-darwin-unsigned.tar.gz
18aa1676cb65f73c79eac01781bca86987247bb6565cd6774332e1b0db9959d8  guix-build-745c797a64ba/output/arm64-apple-darwin/bitcoin-745c797a64ba-arm64-apple-darwin.tar.gz
455a3c80e32505ffb7eb008985579a7b087ea6c4d4915d87b019ac7375a9ecde  guix-build-745c797a64ba/output/dist-archive/bitcoin-745c797a64ba.tar.gz
ed6fa2b071769d39641c51980b986b56b42670f4121294589caf438e46f79f37  guix-build-745c797a64ba/output/powerpc64-linux-gnu/SHA256SUMS.part
6260f3fa1c0955c2ecc2c507a43188bfb29e456c888f8619d615aa0db46be780  guix-build-745c797a64ba/output/powerpc64-linux-gnu/bitcoin-745c797a64ba-powerpc64-linux-gnu-debug.tar.gz
160ab587612d5b5fee25fbab29d8ee8a64ce2847f441c60f5f7c3006a521ba85  guix-build-745c797a64ba/output/powerpc64-linux-gnu/bitcoin-745c797a64ba-powerpc64-linux-gnu.tar.gz
de995da04349c4edf5df2eb97e4bfad5c6425bee5a96a0b9d4fb6a851c878c5c  guix-build-745c797a64ba/output/powerpc64le-linux-gnu/SHA256SUMS.part
c780b674a030b56efa536b6d9d67579f8682461af020634a4f41899b6a714ad5  guix-build-745c797a64ba/output/powerpc64le-linux-gnu/bitcoin-745c797a64ba-powerpc64le-linux-gnu-debug.tar.gz
04ae6d80cec6474db5ed3a55d7e9462c2e32f22558fe483254c6742470362ad4  guix-build-745c797a64ba/output/powerpc64le-linux-gnu/bitcoin-745c797a64ba-powerpc64le-linux-gnu.tar.gz
bb22ee16007c5c30d281a328854e8247456a0101c3aa89f38a42dff3b6c12feb  guix-build-745c797a64ba/output/riscv64-linux-gnu/SHA256SUMS.part
186e6de5c8fff822297c2ba89f33a12ac7a50afd3347f2bf083f69c01d5ca0e7  guix-build-745c797a64ba/output/riscv64-linux-gnu/bitcoin-745c797a64ba-riscv64-linux-gnu-debug.tar.gz
13f4e0833b5d68bf8025b8115fefaf4c8aedccbb3b29cc35e8458051df776d90  guix-build-745c797a64ba/output/riscv64-linux-gnu/bitcoin-745c797a64ba-riscv64-linux-gnu.tar.gz
aea2a10fd06e85ba7c314a9e82380d3b72e564a9d1d3663f82280be687fcf17f  guix-build-745c797a64ba/output/x86_64-apple-darwin/SHA256SUMS.part
ae54514b6c2a5c8bb6f524f7a21985a78cdffd78a7dfaea76aa2b9ba0dc51bd9  guix-build-745c797a64ba/output/x86_64-apple-darwin/bitcoin-745c797a64ba-x86_64-apple-darwin-unsigned.dmg
1c41f1bd7c5d4ff926613eaecfb61eabbf28e79a2ebdefe67c7831242ccfba3e  guix-build-745c797a64ba/output/x86_64-apple-darwin/bitcoin-745c797a64ba-x86_64-apple-darwin-unsigned.tar.gz
39d858b14bf2b7c93f00512343c9266eca906b0cc5ae05f3dad66d9e3beb5bd3  guix-build-745c797a64ba/output/x86_64-apple-darwin/bitcoin-745c797a64ba-x86_64-apple-darwin.tar.gz
241a6fa2699cd157862ec7b6bcdbd1f4f8febef9cfe4c641ba74bbb7e75a2fc6  guix-build-745c797a64ba/output/x86_64-linux-gnu/SHA256SUMS.part
4aab1141502884c253a2944094bdf8e432a8570f6cc7d713963f84823aed1917  guix-build-745c797a64ba/output/x86_64-linux-gnu/bitcoin-745c797a64ba-x86_64-linux-gnu-debug.tar.gz
c998f3a855470f90e5837aecf3f33deb994cb00519c49eb62fcc190b243502e8  guix-build-745c797a64ba/output/x86_64-linux-gnu/bitcoin-745c797a64ba-x86_64-linux-gnu.tar.gz
1be28babb8ff03621669a0d2b8c31d9d5d2d031700271bcd1e16ada0b56dd092  guix-build-745c797a64ba/output/x86_64-w64-mingw32/SHA256SUMS.part
4536a24c9d13dbe974f641c004e1492cb76401126757e5b0815e2c1652ab5b95  guix-build-745c797a64ba/output/x86_64-w64-mingw32/bitcoin-745c797a64ba-win64-debug.zip
b3d161d0f4161ced106f8acccc06f9627f35dadb2437a11a1b47b7d3d97c6912  guix-build-745c797a64ba/output/x86_64-w64-mingw32/bitcoin-745c797a64ba-win64-setup-unsigned.exe
40e331efcf49bc43817c941164c829dcd78d46eee0167d98970076261e4e1bd3  guix-build-745c797a64ba/output/x86_64-w64-mingw32/bitcoin-745c797a64ba-win64-unsigned.tar.gz
1a7ba46ee9ae086f982fbe2afc4e3b0be01ebc02c093c5c9f703b07dc48de0e1  guix-build-745c797a64ba/output/x86_64-w64-mingw32/bitcoin-745c797a64ba-win64.zip

Windows
macOS
Android

@hebasto hebasto marked this pull request as draft August 30, 2021 13:33
Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

Concept ACK

@hebasto
Copy link
Member Author

hebasto commented Aug 30, 2021

FWIW, the Guix built binary log on Windows 10 Pro 21H1 (build 19043.1165) with Nvidia GPU:

2021-08-30T14:56:51Z Bitcoin Core version v22.99.0-gbf88bf7ff1c3410f198ad66fedecbb35be80d525 (release build)
2021-08-30T14:56:51Z Qt 5.12.11 (static), plugin=windows (static)
2021-08-30T14:56:51Z Static plugins:
2021-08-30T14:56:51Z  QtQuick2DialogsPlugin, version 330752
2021-08-30T14:56:51Z  QtQuick2Plugin, version 330752
2021-08-30T14:56:51Z  QtQuick2WindowPlugin, version 330752
2021-08-30T14:56:51Z  QtQuickControls1Plugin, version 330752
2021-08-30T14:56:51Z  QtQuickControls2Plugin, version 330752
2021-08-30T14:56:51Z  QtQuickTemplates2Plugin, version 330752
2021-08-30T14:56:51Z  QWindowsIntegrationPlugin, version 330752
2021-08-30T14:56:51Z QQuickStyle: Default
2021-08-30T14:56:51Z System: Windows 10 (10.0), x86_64-little_endian-llp64
2021-08-30T14:56:51Z Screen: \\.\DISPLAY1 1600x1200, pixel ratio=1.0
2021-08-30T14:56:51Z Validating signatures for all blocks.
2021-08-30T14:56:51Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000
2021-08-30T14:56:51Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2021-08-30T14:56:51Z Using RdSeed as additional entropy source
2021-08-30T14:56:51Z Using RdRand as an additional entropy source
2021-08-30T14:56:52Z GUI: Graphics API in use: "OpenGL ES 2.0 or higher"
2021-08-30T14:56:52Z Default data directory C:\Users\hebasto\AppData\Roaming\Bitcoin
...

@hebasto hebasto force-pushed the 210830-opengl branch 2 times, most recently from 4ec0989 to b7cf7a4 Compare August 31, 2021 09:20
Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

Tested ACK b7cf7a4 on macOS FWIW.

@hebasto
Copy link
Member Author

hebasto commented Sep 12, 2021

@promag

Tested ACK b7cf7a4 on macOS FWIW.

On Linux it is required to add https://gitlab.freedesktop.org/glvnd/libglvnd to our dependencies.

@hebasto
Copy link
Member Author

hebasto commented Nov 20, 2021

On Linux it is required to add https://gitlab.freedesktop.org/glvnd/libglvnd to our dependencies.

I've added the libglvnd package (cherry-picked from bitcoin/bitcoin#22708), but having some issues with -qt-xcb. So, for now, waiting for bitcoin/bitcoin#23489, which gets rid of it.

@hebasto hebasto marked this pull request as ready for review June 3, 2022 10:58
@hebasto
Copy link
Member Author

hebasto commented Jun 3, 2022

Rebased.

@hebasto
Copy link
Member Author

hebasto commented Jun 3, 2022

Guix builds hashes have been added to the PR description.

@hebasto
Copy link
Member Author

hebasto commented Jun 16, 2022

Going to merge this for better development and testing experience.

@hebasto hebasto merged commit 0ca0949 into bitcoin-core:main Jun 16, 2022
@hebasto hebasto deleted the 210830-opengl branch June 16, 2022 11:53
@hebasto hebasto mentioned this pull request Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants