├── .gitignore ├── .qmake.conf ├── LICENSE ├── README.md ├── examples ├── .qmake.stash ├── examples.pro └── quick3d-openxr │ ├── quick3d-openxr.pro │ └── xrgears │ ├── BlueGear.mesh │ ├── GearMaterial.qml │ ├── GreenGear.mesh │ ├── RedGear.mesh │ ├── doc │ └── screenshot.png │ ├── main.cpp │ ├── resources.qrc │ ├── rooftop_night_4k.hdr │ ├── vkvia.html │ ├── xrgears.blend │ ├── xrgears.pro │ └── xrgears.qml ├── quick3d-openxr.pro ├── scripts └── build.sh ├── src ├── quick3d-openxr │ ├── opengl.cpp │ ├── opengl.h │ ├── opengl_meta.h │ ├── openxr.cpp │ ├── openxr.h │ ├── openxr_meta.h │ ├── openxrframe.cpp │ ├── openxrframe.h │ ├── openxrgraphics.cpp │ ├── openxrgraphics.h │ ├── openxrrenderthread.cpp │ ├── openxrrenderthread.h │ ├── qopenxrapplication.cpp │ ├── qopenxrapplication.h │ ├── quick3d-openxr.pro │ ├── quick3d-openxr_global.h │ └── quick3d-openxr_meta.h └── src.pro ├── sync.profile └── tests ├── auto ├── auto.pro └── cmake │ ├── CMakeLists.txt │ └── cmake.pro └── tests.pro /.gitignore: -------------------------------------------------------------------------------- 1 | # This file is used to ignore files which are generated 2 | # ---------------------------------------------------------------------------- 3 | 4 | *~ 5 | *.autosave 6 | *.a 7 | *.core 8 | *.moc 9 | *.o 10 | *.obj 11 | *.orig 12 | *.rej 13 | *.so 14 | *.so.* 15 | *_pch.h.cpp 16 | *_resource.rc 17 | *.qm 18 | .#* 19 | *.*# 20 | core 21 | !core/ 22 | tags 23 | .DS_Store 24 | .directory 25 | *.debug 26 | Makefile* 27 | *.prl 28 | *.app 29 | moc_*.cpp 30 | ui_*.h 31 | qrc_*.cpp 32 | Thumbs.db 33 | *.res 34 | *.rc 35 | /.qmake.cache 36 | /.qmake.stash 37 | 38 | # qtcreator generated files 39 | *.pro.user* 40 | 41 | # xemacs temporary files 42 | *.flc 43 | 44 | # Vim temporary files 45 | .*.swp 46 | 47 | # Visual Studio generated files 48 | *.ib_pdb_index 49 | *.idb 50 | *.ilk 51 | *.pdb 52 | *.sln 53 | *.suo 54 | *.vcproj 55 | *vcproj.*.*.user 56 | *.ncb 57 | *.sdf 58 | *.opensdf 59 | *.vcxproj 60 | *vcxproj.* 61 | 62 | # MinGW generated files 63 | *.Debug 64 | *.Release 65 | 66 | # Python byte code 67 | *.pyc 68 | 69 | # Binaries 70 | # -------- 71 | *.dll 72 | *.exe 73 | 74 | build 75 | 76 | -------------------------------------------------------------------------------- /.qmake.conf: -------------------------------------------------------------------------------- 1 | load(qt_build_config) 2 | 3 | CONFIG += warning_clean 4 | DEFINES += QT_NO_FOREACH 5 | 6 | MODULE_VERSION = 0.1.0 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Nova King 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Qt Quick 3D OpenXR Module 2 | ![XRGears demo](https://github.com/technobaboo/quick3d-openxr/blob/master/examples/quick3d-openxr/xrgears/doc/screenshot.png?raw=true) 3 | 4 | This is a module, made using Qt 5.14.0, that speeds up the creation of OpenXR applications for Qt Quick 3D. 5 | 6 | ## Installation 7 | 1. Install Monado (https://gitlab.freedesktop.org/monado/monado) and ensure xrgears runs 8 | 2. Install Qt 5.14.1 base, QML, Quick and Quick 3D via package manager, Qt's website (https://www.qt.io/download), or compile it yourself (https://github.com/qt) 9 | 3. Build Quick3D-OpenXR using the provided scripts (make sure qmake is in your PATH): 10 | ``` 11 | $ mkdir build && cd build 12 | $ sh ../scripts/build.sh .. 13 | ``` 14 | 15 | ## Basic Usage Guide 16 | Quick3D-OpenXR does most of the work connecting to OpenXR and setting up Qt Quick 3D. But there are still a few steps you need to do: 17 | 18 | In `int main` in main.cpp: 19 | 1. Create a `QGuiApplication` 20 | 2. Create a `QOpenXRApplication` 21 | 3. Register any QML types you need to 22 | 4. Create a `QQmlEngine` 23 | 5. Create a `QQmlComponent` loading the QML for the main scene synchronously 24 | 6. Initialize the `QOpenXRApplication` 25 | 26 | Example main.cpp: 27 | ```cpp 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | int main(int argc, char *argv[]) { 34 | QGuiApplication a(argc, argv); 35 | 36 | QOpenXRApplication *xrApp = new QOpenXRApplication(nullptr); 37 | qmlRegisterSingletonInstance("QtQuick3D.OpenXR", 1, 0, "OpenXR", xrApp); 38 | 39 | QQmlEngine *mainQmlEngine = new QQmlEngine(); 40 | QQmlComponent *sceneComponent = new QQmlComponent(mainQmlEngine, QUrl("qrc:/xrgears.qml"), QQmlComponent::PreferSynchronous); 41 | 42 | xrApp->initialize(mainQmlEngine, sceneComponent); 43 | 44 | return a.exec(); 45 | } 46 | ``` 47 | -------------------------------------------------------------------------------- /examples/.qmake.stash: -------------------------------------------------------------------------------- 1 | QMAKE_CXX.QT_COMPILER_STDCXX = 201402L 2 | QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 9 3 | QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2 4 | QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 1 5 | QMAKE_CXX.COMPILER_MACROS = \ 6 | QT_COMPILER_STDCXX \ 7 | QMAKE_GCC_MAJOR_VERSION \ 8 | QMAKE_GCC_MINOR_VERSION \ 9 | QMAKE_GCC_PATCH_VERSION 10 | QMAKE_CXX.INCDIRS = \ 11 | /usr/include/c++/9 \ 12 | /usr/include/x86_64-linux-gnu/c++/9 \ 13 | /usr/include/c++/9/backward \ 14 | /usr/lib/gcc/x86_64-linux-gnu/9/include \ 15 | /usr/local/include \ 16 | /usr/lib/gcc/x86_64-linux-gnu/9/include-fixed \ 17 | /usr/include/x86_64-linux-gnu \ 18 | /usr/include 19 | QMAKE_CXX.LIBDIRS = \ 20 | /usr/lib/gcc/x86_64-linux-gnu/9 \ 21 | /usr/lib/x86_64-linux-gnu \ 22 | /usr/lib \ 23 | /lib/x86_64-linux-gnu \ 24 | /lib 25 | -------------------------------------------------------------------------------- /examples/examples.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS += quick3d-openxr 3 | -------------------------------------------------------------------------------- /examples/quick3d-openxr/quick3d-openxr.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS += xrgears 3 | -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/BlueGear.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/technobaboo/quick3d-openxr/e61c0c5de3b50ed7991b97dae84276d4f3371e76/examples/quick3d-openxr/xrgears/BlueGear.mesh -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/GearMaterial.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | import QtQuick3D 1.14 3 | 4 | DefaultMaterial { 5 | diffuseLightWrap: 2 6 | specularRoughness: 0.2 7 | specularAmount: 1 8 | } 9 | -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/GreenGear.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/technobaboo/quick3d-openxr/e61c0c5de3b50ed7991b97dae84276d4f3371e76/examples/quick3d-openxr/xrgears/GreenGear.mesh -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/RedGear.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/technobaboo/quick3d-openxr/e61c0c5de3b50ed7991b97dae84276d4f3371e76/examples/quick3d-openxr/xrgears/RedGear.mesh -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/doc/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/technobaboo/quick3d-openxr/e61c0c5de3b50ed7991b97dae84276d4f3371e76/examples/quick3d-openxr/xrgears/doc/screenshot.png -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char *argv[]) { 7 | QGuiApplication a(argc, argv); 8 | 9 | QOpenXRApplication *xrApp = new QOpenXRApplication(nullptr); 10 | qmlRegisterSingletonInstance("QtQuick3D.OpenXR", 1, 0, "OpenXR", xrApp); 11 | 12 | QQmlEngine *mainQmlEngine = new QQmlEngine(); 13 | QQmlComponent *sceneComponent = new QQmlComponent(mainQmlEngine, QUrl("qrc:/xrgears.qml"), QQmlComponent::PreferSynchronous); 14 | 15 | xrApp->initialize(mainQmlEngine, sceneComponent); 16 | 17 | return a.exec(); 18 | } 19 | -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | BlueGear.mesh 4 | GreenGear.mesh 5 | RedGear.mesh 6 | xrgears.qml 7 | GearMaterial.qml 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/rooftop_night_4k.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/technobaboo/quick3d-openxr/e61c0c5de3b50ed7991b97dae84276d4f3371e76/examples/quick3d-openxr/xrgears/rooftop_night_4k.hdr -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/vkvia.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LunarG VIA 6 | 7 | 69 | 70 | 78 | 79 | 80 | 81 | 82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |

                                                                 Version 1.3

98 |
99 |

< NOTE: Click on section name to expand table >

100 |
101 |

System Info

102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 |
Environment
Linux
DistroPop!_OS 19.10
Kernel Build5.3.0-20-generic
Machine Targetx86_64
Version#21+system76~1572304854~19.10~8caa3e6-Ubuntu SMP Tue Oct 29 00:4
DESKTOP_SESSIONpop
LD_LIBRARY_PATH/home/nova/Documents/vulkan-sdk/x86_64/lib::/home/nova/Qt/5.14.0/qtbase/lib
DISPLAY:0
147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 170 | 171 |
Hardware
CPUs8
MemoryPhysical Available11 GB
System Disk SpaceFree87 GB
Current Dir Disk SpaceFree88G 169 |
172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 |
Executable Info
Exe Directory/home/nova/Documents/vulkan-sdk/x86_64/bin
Current Directory/home/nova/Documents/stardust/quick3d-openxr/examples/quick3d-openxr/xrgears
App VersionVersion 1.3
Vulkan API Version1.1.114
Byte Format64-bit
197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 |
Vulkan Driver Info
Standard Paths
/etc/vulkan/icd.d
[0]amd_icd64.json
JSON File Version1.0.0
API Version1.1.70
Library Path/opt/amdgpu/lib/x86_64-linux-gnu/amdvlk64.so
/usr/share/vulkan/icd.d
[0]radeon_icd.x86_64.json
JSON File Version1.0.0
API Version1.1.107
Library Path/usr/lib/x86_64-linux-gnu/libvulkan_radeon.so
[1]intel_icd.x86_64.json
JSON File Version1.0.0
API Version1.1.102
Library Path/usr/lib/x86_64-linux-gnu/libvulkan_intel.so
/usr/local/etc/vulkan/icd.dNo such folder
/usr/local/share/vulkan/icd.dNo such folder
/home/nova/.local/share/vulkan/icd.dNo such folder
292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 |
Vulkan Runtimes
Possible Runtime Folders
/usr/lib
No libvulkan.so files found
/usr/lib/x86_64-linux-gnu
[0]/usr/lib/x86_64-linux-gnu/libvulkan.so.1libvulkan.so.1.1.114
/usr/lib64No such folder
/usr/local/lib
No libvulkan.so files found
/usr/local/lib64No such folder
/home/nova/Documents/vulkan-sdk/x86_64/lib
[0]/home/nova/Documents/vulkan-sdk/x86_64/lib/libvulkan.so.1libvulkan.so.1.1.114
/home/nova/Qt/5.14.0/qtbase/libNo such folder
Runtime Folder Used By via/home/nova/Documents/vulkan-sdk/x86_64/lib
[0]/home/nova/Documents/vulkan-sdk/x86_64/lib/libvulkan.so.1libvulkan.so.1.1.114
368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 |
LunarG Vulkan SDKs
VULKAN_SDK
/home/nova/Documents/vulkan-sdk/x86_64/etc/vulkan/explicit_layer.d
[0]VkLayer_standard_validation.json
NameVK_LAYER_LUNARG_standard_validation
DescriptionLunarG Standard Validation
API Version1.1.114
JSON File Version1.1.1
Component Layers1
VK_LAYER_KHRONOS_validation
[1]VkLayer_object_lifetimes.json
NameVK_LAYER_LUNARG_object_tracker
DescriptionLunarG Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_object_lifetimes.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_report
[2]VkLayer_core_validation.json
NameVK_LAYER_LUNARG_core_validation
DescriptionLunarG Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_core_validation.so
Device Extensions2
[0]VK_EXT_debug_marker
[0]VK_EXT_validation_cache
Instance Extensions1
[0]VK_EXT_debug_report
[3]VkLayer_api_dump.json
NameVK_LAYER_LUNARG_api_dump
DescriptionLunarG API dump layer
API Version1.1.114
JSON File Version1.0.0
Library PathlibVkLayer_api_dump.so
[4]VkLayer_screenshot.json
NameVK_LAYER_LUNARG_screenshot
DescriptionLunarG image capture layer
API Version1.1.114
JSON File Version1.0.0
Library PathlibVkLayer_screenshot.so
[5]VkLayer_khronos_validation.json
NameVK_LAYER_KHRONOS_validation
DescriptionLunarG Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_khronos_validation.so
Device Extensions2
[0]VK_EXT_debug_marker
[0]VK_EXT_validation_cache
Instance Extensions1
[0]VK_EXT_debug_report
[6]VkLayer_unique_objects.json
NameVK_LAYER_GOOGLE_unique_objects
DescriptionGoogle Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_unique_objects.so
[7]VkLayer_assistant_layer.json
NameVK_LAYER_LUNARG_assistant_layer
DescriptionLunarG Validation Layer Factory Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_assistant_layer.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_report
[8]VkLayer_stateless_validation.json
NameVK_LAYER_LUNARG_parameter_validation
DescriptionLunarG Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_stateless_validation.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_report
[9]VkLayer_monitor.json
NameVK_LAYER_LUNARG_monitor
DescriptionExecution Monitoring Layer
API Version1.1.114
JSON File Version1.0.0
Library PathlibVkLayer_monitor.so
[10]VkLayer_device_simulation.json
NameVK_LAYER_LUNARG_device_simulation
DescriptionLunarG device simulation layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_device_simulation.so
[11]VkLayer_thread_safety.json
NameVK_LAYER_GOOGLE_threading
DescriptionGoogle Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_thread_safety.so
Instance Extensions1
[0]VK_EXT_debug_report
[12]VkLayer_vktrace_layer.json
NameVK_LAYER_LUNARG_vktrace
DescriptionVktrace tracing library
API Version1.1.114
JSON File Version1.0.0
Library PathlibVkLayer_vktrace_layer.so
1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | 1284 | 1285 | 1286 | 1287 | 1288 | 1289 | 1290 | 1291 | 1292 | 1293 | 1294 | 1295 | 1296 | 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1325 | 1326 | 1327 | 1328 | 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 |
Vulkan Implicit Layers
/etc/vulkan/implicit_layer.d
/usr/share/vulkan/implicit_layer.d
[0]renderdoc_capture.json
NameVK_LAYER_RENDERDOC_Capture
DescriptionDebugging capture layer for RenderDoc
API Version1.1.73
JSON File Version1.1.2
Library Path/usr/lib/librenderdoc.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_utils
Enabled StateDISABLED
Enable Env VarENABLE_VULKAN_RENDERDOC_CAPTURENot Defined
Disable Env VarDISABLE_VULKAN_RENDERDOC_CAPTURE_1_4Not Defined
/usr/local/etc/vulkan/implicit_layer.d
[1]renderdoc_capture.json
NameVK_LAYER_RENDERDOC_Capture
DescriptionDebugging capture layer for RenderDoc
API Version1.1.73
JSON File Version1.1.2
Library Path/io/dist/lib/librenderdoc.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_utils
Enabled StateDISABLED
Enable Env VarENABLE_VULKAN_RENDERDOC_CAPTURENot Defined
Disable Env VarDISABLE_VULKAN_RENDERDOC_CAPTURE_1_4Not Defined
/usr/local/share/vulkan/implicit_layer.dDirectory does not exist
/home/nova/.local/share/vulkan/implicit_layer.d
[2]steamoverlay_x86_64.json
NameVK_LAYER_VALVE_steam_overlay_64
DescriptionSteam Overlay Layer
API Version1.1.73
JSON File Version1.0.0
Library Path/home/nova/.local/share/Steam/ubuntu12_64/steamoverlayvulkanlayer.so
Enabled StateDISABLED
Enable Env VarENABLE_VK_LAYER_VALVE_steam_overlay_1Not Defined
Disable Env VarDISABLE_VK_LAYER_VALVE_steam_overlay_1Not Defined
[3]steamoverlay_i386.json
NameVK_LAYER_VALVE_steam_overlay_32
DescriptionSteam Overlay Layer
API Version1.1.73
JSON File Version1.0.0
Library Path/home/nova/.local/share/Steam/ubuntu12_32/steamoverlayvulkanlayer.so
Enabled StateDISABLED
Enable Env VarENABLE_VK_LAYER_VALVE_steam_overlay_1Not Defined
Disable Env VarDISABLE_VK_LAYER_VALVE_steam_overlay_1Not Defined
[4]steamfossilize_i386.json
NameVK_LAYER_VALVE_steam_fossilize_32
DescriptionSteam Pipeline Caching Layer
API Version1.1.73
JSON File Version1.0.0
Library Path/home/nova/.local/share/Steam/ubuntu12_32/libVkLayer_steam_fossilize.so
Enabled StateDISABLED
Enable Env VarENABLE_VK_LAYER_VALVE_steam_fossilize_1Not Defined
Disable Env VarDISABLE_VK_LAYER_VALVE_steam_fossilize_1Not Defined
[5]steamfossilize_x86_64.json
NameVK_LAYER_VALVE_steam_fossilize_64
DescriptionSteam Pipeline Caching Layer
API Version1.1.73
JSON File Version1.0.0
Library Path/home/nova/.local/share/Steam/ubuntu12_64/libVkLayer_steam_fossilize.so
Enabled StateDISABLED
Enable Env VarENABLE_VK_LAYER_VALVE_steam_fossilize_1Not Defined
Disable Env VarDISABLE_VK_LAYER_VALVE_steam_fossilize_1Not Defined
1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 | 1422 | 1423 | 1424 | 1425 | 1426 | 1427 | 1428 | 1429 | 1430 | 1431 | 1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1438 | 1439 | 1440 | 1441 | 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | 1448 | 1449 | 1450 | 1451 | 1452 | 1453 | 1454 | 1455 | 1456 | 1457 | 1458 | 1459 | 1460 | 1461 | 1462 | 1463 | 1464 | 1465 | 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | 1500 | 1501 | 1502 | 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 | 1511 | 1512 | 1513 | 1514 | 1515 | 1516 | 1517 | 1518 | 1519 | 1520 | 1521 | 1522 | 1523 | 1524 | 1525 | 1526 | 1527 | 1528 | 1529 | 1530 | 1531 | 1532 | 1533 | 1534 | 1535 | 1536 | 1537 | 1538 | 1539 | 1540 | 1541 | 1542 | 1543 | 1544 | 1545 | 1546 | 1547 | 1548 | 1549 | 1550 | 1551 | 1552 | 1553 | 1554 | 1555 | 1556 | 1557 | 1558 | 1559 | 1560 | 1561 | 1562 | 1563 | 1564 | 1565 | 1566 | 1567 | 1568 | 1569 | 1570 | 1571 | 1572 | 1573 | 1574 | 1575 | 1576 | 1577 | 1578 | 1579 | 1580 | 1581 | 1582 | 1583 | 1584 | 1585 | 1586 | 1587 | 1588 | 1589 | 1590 | 1591 | 1592 | 1593 | 1594 | 1595 | 1596 | 1597 | 1598 | 1599 | 1600 | 1601 | 1602 | 1603 | 1604 | 1605 | 1606 | 1607 | 1608 | 1609 | 1610 | 1611 | 1612 | 1613 | 1614 | 1615 | 1616 | 1617 | 1618 | 1619 | 1620 | 1621 | 1622 | 1623 | 1624 | 1625 | 1626 | 1627 | 1628 | 1629 | 1630 | 1631 | 1632 | 1633 | 1634 | 1635 | 1636 | 1637 | 1638 | 1639 | 1640 | 1641 | 1642 | 1643 | 1644 | 1645 | 1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 1653 | 1654 | 1655 | 1656 | 1657 | 1658 | 1659 | 1660 | 1661 | 1662 | 1663 | 1664 | 1665 | 1666 | 1667 | 1668 | 1669 | 1670 | 1671 | 1672 | 1673 | 1674 | 1675 | 1676 | 1677 | 1678 | 1679 | 1680 | 1681 | 1682 | 1683 | 1684 | 1685 | 1686 | 1687 | 1688 | 1689 | 1690 | 1691 | 1692 | 1693 | 1694 | 1695 | 1696 | 1697 | 1698 | 1699 | 1700 | 1701 | 1702 | 1703 | 1704 | 1705 | 1706 | 1707 | 1708 | 1709 | 1710 | 1711 | 1712 | 1713 | 1714 | 1715 | 1716 | 1717 | 1718 | 1719 | 1720 | 1721 | 1722 | 1723 | 1724 | 1725 | 1726 | 1727 | 1728 | 1729 | 1730 | 1731 | 1732 | 1733 | 1734 | 1735 | 1736 | 1737 | 1738 | 1739 | 1740 | 1741 | 1742 | 1743 | 1744 | 1745 | 1746 | 1747 | 1748 | 1749 | 1750 | 1751 | 1752 | 1753 | 1754 | 1755 | 1756 | 1757 | 1758 | 1759 | 1760 | 1761 | 1762 | 1763 | 1764 | 1765 | 1766 | 1767 | 1768 | 1769 | 1770 | 1771 | 1772 | 1773 | 1774 | 1775 | 1776 | 1777 | 1778 | 1779 | 1780 | 1781 | 1782 | 1783 | 1784 | 1785 | 1786 | 1787 | 1788 | 1789 | 1790 | 1791 | 1792 | 1793 | 1794 | 1795 | 1796 | 1797 | 1798 | 1799 | 1800 | 1801 | 1802 | 1803 | 1804 | 1805 | 1806 | 1807 | 1808 | 1809 | 1810 | 1811 | 1812 | 1813 | 1814 | 1815 | 1816 | 1817 | 1818 | 1819 | 1820 | 1821 | 1822 | 1823 | 1824 | 1825 | 1826 | 1827 | 1828 | 1829 | 1830 | 1831 | 1832 | 1833 | 1834 | 1835 | 1836 | 1837 | 1838 | 1839 | 1840 | 1841 | 1842 | 1843 | 1844 | 1845 | 1846 | 1847 | 1848 | 1849 | 1850 | 1851 | 1852 | 1853 | 1854 | 1855 | 1856 | 1857 | 1858 | 1859 | 1860 | 1861 | 1862 | 1863 | 1864 | 1865 | 1866 | 1867 | 1868 | 1869 | 1870 | 1871 | 1872 | 1873 | 1874 | 1875 | 1876 | 1877 | 1878 | 1879 | 1880 | 1881 | 1882 | 1883 | 1884 | 1885 | 1886 | 1887 | 1888 | 1889 | 1890 | 1891 | 1892 | 1893 | 1894 | 1895 | 1896 | 1897 | 1898 | 1899 | 1900 | 1901 | 1902 | 1903 | 1904 | 1905 | 1906 | 1907 | 1908 | 1909 | 1910 | 1911 | 1912 | 1913 | 1914 | 1915 | 1916 | 1917 | 1918 | 1919 | 1920 | 1921 | 1922 | 1923 | 1924 | 1925 | 1926 | 1927 | 1928 | 1929 | 1930 | 1931 | 1932 | 1933 | 1934 | 1935 | 1936 | 1937 | 1938 | 1939 | 1940 | 1941 | 1942 | 1943 | 1944 | 1945 | 1946 | 1947 | 1948 | 1949 | 1950 | 1951 | 1952 | 1953 | 1954 | 1955 | 1956 | 1957 | 1958 | 1959 | 1960 | 1961 | 1962 | 1963 | 1964 | 1965 | 1966 | 1967 | 1968 | 1969 | 1970 | 1971 | 1972 | 1973 | 1974 | 1975 | 1976 | 1977 | 1978 | 1979 | 1980 | 1981 | 1982 | 1983 | 1984 | 1985 | 1986 | 1987 | 1988 | 1989 | 1990 | 1991 | 1992 | 1993 | 1994 | 1995 | 1996 | 1997 | 1998 | 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | 2033 | 2034 | 2035 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 2043 | 2044 | 2045 | 2046 | 2047 | 2048 | 2049 | 2050 | 2051 | 2052 | 2053 | 2054 | 2055 | 2056 | 2057 | 2058 | 2059 | 2060 | 2061 | 2062 | 2063 | 2064 | 2065 | 2066 | 2067 | 2068 | 2069 | 2070 | 2071 | 2072 | 2073 | 2074 | 2075 | 2076 | 2077 | 2078 | 2079 | 2080 | 2081 | 2082 | 2083 | 2084 | 2085 | 2086 | 2087 | 2088 | 2089 | 2090 | 2091 | 2092 | 2093 | 2094 | 2095 | 2096 | 2097 | 2098 | 2099 | 2100 | 2101 | 2102 | 2103 | 2104 | 2105 | 2106 | 2107 | 2108 | 2109 | 2110 | 2111 | 2112 | 2113 | 2114 | 2115 | 2116 | 2117 | 2118 | 2119 | 2120 | 2121 | 2122 | 2123 | 2124 | 2125 | 2126 | 2127 | 2128 | 2129 | 2130 | 2131 | 2132 | 2133 | 2134 | 2135 | 2136 | 2137 | 2138 | 2139 | 2140 | 2141 | 2142 | 2143 | 2144 | 2145 | 2146 | 2147 | 2148 | 2149 | 2150 | 2151 | 2152 | 2153 | 2154 | 2155 | 2156 | 2157 | 2158 | 2159 | 2160 | 2161 | 2162 | 2163 | 2164 | 2165 | 2166 | 2167 | 2168 | 2169 | 2170 | 2171 | 2172 | 2173 | 2174 | 2175 | 2176 | 2177 | 2178 | 2179 | 2180 | 2181 | 2182 | 2183 | 2184 | 2185 | 2186 | 2187 | 2188 | 2189 | 2190 | 2191 | 2192 | 2193 | 2194 | 2195 | 2196 | 2197 | 2198 | 2199 | 2200 | 2201 | 2202 | 2203 | 2204 | 2205 | 2206 | 2207 | 2208 | 2209 | 2210 | 2211 | 2212 | 2213 | 2214 | 2215 | 2216 | 2217 | 2218 | 2219 | 2220 | 2221 | 2222 | 2223 | 2224 | 2225 | 2226 | 2227 | 2228 | 2229 | 2230 | 2231 | 2232 | 2233 | 2234 | 2235 | 2236 | 2237 | 2238 | 2239 | 2240 | 2241 | 2242 | 2243 | 2244 | 2245 | 2246 | 2247 | 2248 | 2249 | 2250 | 2251 | 2252 | 2253 | 2254 | 2255 | 2256 | 2257 | 2258 | 2259 | 2260 | 2261 | 2262 | 2263 | 2264 | 2265 | 2266 | 2267 | 2268 | 2269 | 2270 | 2271 | 2272 | 2273 | 2274 | 2275 | 2276 | 2277 | 2278 | 2279 | 2280 | 2281 | 2282 | 2283 | 2284 | 2285 | 2286 | 2287 | 2288 | 2289 | 2290 | 2291 | 2292 | 2293 | 2294 | 2295 | 2296 | 2297 | 2298 | 2299 | 2300 | 2301 | 2302 | 2303 | 2304 | 2305 | 2306 | 2307 | 2308 | 2309 | 2310 | 2311 | 2312 | 2313 | 2314 | 2315 | 2316 | 2317 | 2318 | 2319 | 2320 | 2321 | 2322 | 2323 | 2324 | 2325 | 2326 | 2327 | 2328 | 2329 | 2330 | 2331 | 2332 | 2333 | 2334 | 2335 | 2336 | 2337 | 2338 | 2339 | 2340 | 2341 | 2342 | 2343 | 2344 | 2345 | 2346 | 2347 | 2348 | 2349 | 2350 | 2351 | 2352 | 2353 | 2354 | 2355 | 2356 | 2357 | 2358 | 2359 | 2360 | 2361 | 2362 | 2363 | 2364 | 2365 | 2366 | 2367 | 2368 | 2369 | 2370 | 2371 | 2372 | 2373 | 2374 | 2375 | 2376 | 2377 | 2378 | 2379 | 2380 | 2381 | 2382 | 2383 | 2384 | 2385 | 2386 | 2387 | 2388 | 2389 | 2390 | 2391 | 2392 | 2393 | 2394 | 2395 | 2396 | 2397 | 2398 | 2399 | 2400 | 2401 | 2402 | 2403 | 2404 | 2405 | 2406 | 2407 | 2408 | 2409 | 2410 | 2411 | 2412 | 2413 | 2414 | 2415 | 2416 | 2417 | 2418 | 2419 | 2420 | 2421 | 2422 | 2423 | 2424 | 2425 | 2426 | 2427 | 2428 | 2429 | 2430 | 2431 | 2432 | 2433 | 2434 | 2435 | 2436 | 2437 | 2438 | 2439 | 2440 | 2441 | 2442 | 2443 | 2444 | 2445 | 2446 | 2447 | 2448 | 2449 | 2450 | 2451 | 2452 | 2453 | 2454 | 2455 | 2456 | 2457 | 2458 |
Vulkan Explicit Layers
VK_LAYER_PATH
Path 0/home/nova/Documents/vulkan-sdk/x86_64/etc/vulkan/explicit_layer.d
[0]VkLayer_standard_validation.json
NameVK_LAYER_LUNARG_standard_validation
DescriptionLunarG Standard Validation
API Version1.1.114
JSON File Version1.1.1
Component Layers1
VK_LAYER_KHRONOS_validation
[1]VkLayer_object_lifetimes.json
NameVK_LAYER_LUNARG_object_tracker
DescriptionLunarG Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_object_lifetimes.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_report
[2]VkLayer_core_validation.json
NameVK_LAYER_LUNARG_core_validation
DescriptionLunarG Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_core_validation.so
Device Extensions2
[0]VK_EXT_debug_marker
[0]VK_EXT_validation_cache
Instance Extensions1
[0]VK_EXT_debug_report
[3]VkLayer_api_dump.json
NameVK_LAYER_LUNARG_api_dump
DescriptionLunarG API dump layer
API Version1.1.114
JSON File Version1.0.0
Library PathlibVkLayer_api_dump.so
[4]VkLayer_screenshot.json
NameVK_LAYER_LUNARG_screenshot
DescriptionLunarG image capture layer
API Version1.1.114
JSON File Version1.0.0
Library PathlibVkLayer_screenshot.so
[5]VkLayer_khronos_validation.json
NameVK_LAYER_KHRONOS_validation
DescriptionLunarG Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_khronos_validation.so
Device Extensions2
[0]VK_EXT_debug_marker
[0]VK_EXT_validation_cache
Instance Extensions1
[0]VK_EXT_debug_report
[6]VkLayer_unique_objects.json
NameVK_LAYER_GOOGLE_unique_objects
DescriptionGoogle Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_unique_objects.so
[7]VkLayer_assistant_layer.json
NameVK_LAYER_LUNARG_assistant_layer
DescriptionLunarG Validation Layer Factory Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_assistant_layer.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_report
[8]VkLayer_stateless_validation.json
NameVK_LAYER_LUNARG_parameter_validation
DescriptionLunarG Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_stateless_validation.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_report
[9]VkLayer_monitor.json
NameVK_LAYER_LUNARG_monitor
DescriptionExecution Monitoring Layer
API Version1.1.114
JSON File Version1.0.0
Library PathlibVkLayer_monitor.so
[10]VkLayer_device_simulation.json
NameVK_LAYER_LUNARG_device_simulation
DescriptionLunarG device simulation layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_device_simulation.so
[11]VkLayer_thread_safety.json
NameVK_LAYER_GOOGLE_threading
DescriptionGoogle Validation Layer
API Version1.1.114
JSON File Version1.1.0
Library PathlibVkLayer_thread_safety.so
Instance Extensions1
[0]VK_EXT_debug_report
[12]VkLayer_vktrace_layer.json
NameVK_LAYER_LUNARG_vktrace
DescriptionVktrace tracing library
API Version1.1.114
JSON File Version1.0.0
Library PathlibVkLayer_vktrace_layer.so
Standard Paths
/etc/vulkan/etc/vulkan/explicit_layer.d
/etc/vulkan/etc/vulkan/explicit_layer.dNo JSON files found
/usr/share/vulkan/usr/share/vulkan/explicit_layer.d
[0]VkLayer_standard_validation.json
NameVK_LAYER_LUNARG_standard_validation
DescriptionLunarG Standard Validation
API Version1.1.101
JSON File Version1.1.1
Component Layers5
VK_LAYER_GOOGLE_threading
VK_LAYER_LUNARG_parameter_validation
VK_LAYER_LUNARG_object_tracker
VK_LAYER_LUNARG_core_validation
VK_LAYER_GOOGLE_unique_objects
[1]VkLayer_object_lifetimes.json
NameVK_LAYER_LUNARG_object_tracker
DescriptionLunarG Validation Layer
API Version1.1.101
JSON File Version1.1.0
Library PathlibVkLayer_object_lifetimes.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_report
[2]VkLayer_core_validation.json
NameVK_LAYER_LUNARG_core_validation
DescriptionLunarG Validation Layer
API Version1.1.101
JSON File Version1.1.0
Library PathlibVkLayer_core_validation.so
Device Extensions2
[0]VK_EXT_debug_marker
[0]VK_EXT_validation_cache
Instance Extensions1
[0]VK_EXT_debug_report
[3]VkLayer_MESA_overlay.json
NameVK_LAYER_MESA_overlay
DescriptionMesa Overlay layer
API Version1.1.73
JSON File Version1.0.0
Library PathlibVkLayer_MESA_overlay.so
[4]VkLayer_unique_objects.json
NameVK_LAYER_GOOGLE_unique_objects
DescriptionGoogle Validation Layer
API Version1.1.101
JSON File Version1.1.0
Library PathlibVkLayer_unique_objects.so
[5]VkLayer_stateless_validation.json
NameVK_LAYER_LUNARG_parameter_validation
DescriptionLunarG Validation Layer
API Version1.1.101
JSON File Version1.1.0
Library PathlibVkLayer_stateless_validation.so
Device Extensions1
[0]VK_EXT_debug_marker
Instance Extensions1
[0]VK_EXT_debug_report
[6]VkLayer_thread_safety.json
NameVK_LAYER_GOOGLE_threading
DescriptionGoogle Validation Layer
API Version1.1.101
JSON File Version1.1.0
Library PathlibVkLayer_thread_safety.so
Instance Extensions1
[0]VK_EXT_debug_report
/usr/local/etc/vulkan/usr/local/etc/vulkan/explicit_layer.dNo such folder
/usr/local/share/vulkan/usr/local/share/vulkan/explicit_layer.dNo such folder
$HOME/.local/share/vulkan/explicit_layer.d/home/nova/.local/share/vulkan/explicit_layer.dNo such folder
2459 | 2460 | 2461 | 2462 | 2463 | 2464 | 2465 | 2466 | 2467 | 2468 | 2469 | 2470 | 2471 | 2472 | 2473 | 2474 | 2475 | 2476 | 2477 | 2478 | 2479 | 2480 | 2481 | 2482 | 2483 | 2484 | 2485 | 2486 | 2487 | 2488 | 2489 | 2490 | 2491 | 2492 | 2493 | 2494 | 2495 | 2496 | 2497 | 2498 | 2499 |
Vulkan Layer Settings File
VK_LAYER_SETTINGS_PATHNot Defined
/etc/vulkan/settings.d/vk_layer_settings.txtFailed to open settings file
/usr/share/vulkan/settings.d/vk_layer_settings.txtFailed to open settings file
/usr/local/etc/vulkan/settings.d/vk_layer_settings.txtFailed to open settings file
/usr/local/share/vulkan/settings.d/vk_layer_settings.txtFailed to open settings file
/home/nova/.local/share/vulkan/settings.d/vk_layer_settings.txtFailed to open settings file
2500 |
2501 |
2502 |

Vulkan API Calls

2503 | 2504 | 2505 | 2506 | 2507 | 2508 | 2509 | 2510 | 2511 | 2512 | 2513 | 2514 | 2515 | 2516 | 2517 | 2518 | 2519 | 2520 | 2521 | 2522 | 2523 | 2524 | 2525 | 2526 | 2527 | 2528 | 2529 | 2530 | 2531 | 2532 | 2533 | 2534 | 2535 | 2536 | 2537 | 2538 | 2539 | 2540 | 2541 | 2542 | 2543 | 2544 | 2545 | 2546 | 2547 | 2548 | 2549 | 2550 | 2551 | 2552 | 2553 | 2554 | 2555 | 2556 | 2557 | 2558 | 2559 | 2560 | 2561 | 2562 | 2563 | 2564 | 2565 | 2566 | 2567 | 2568 | 2569 | 2570 | 2571 | 2572 | 2573 | 2574 | 2575 | 2576 | 2577 | 2578 | 2579 | 2580 | 2581 | 2582 | 2583 | 2584 | 2585 | 2586 | 2587 | 2588 | 2589 | 2590 | 2591 | 2592 | 2593 | 2594 | 2595 | 2596 | 2597 | 2598 | 2599 | 2600 | 2601 | 2602 | 2603 | 2604 | 2605 | 2606 | 2607 | 2608 | 2609 | 2610 | 2611 | 2612 | 2613 | 2614 | 2615 | 2616 | 2617 |
Instance
vkEnumerateInstanceVersionMax Instance Version1.1.0
vkEnumerateInstanceExtensionProperties18 extensions found
[0]VK_KHR_device_group_creationSpec Vers 1
[1]VK_KHR_external_fence_capabilitiesSpec Vers 1
[2]VK_KHR_external_memory_capabilitiesSpec Vers 1
[3]VK_KHR_external_semaphore_capabilitiesSpec Vers 1
[4]VK_KHR_get_display_properties2Spec Vers 1
[5]VK_KHR_get_physical_device_properties2Spec Vers 1
[6]VK_KHR_get_surface_capabilities2Spec Vers 1
[7]VK_KHR_surfaceSpec Vers 25
[8]VK_KHR_surface_protected_capabilitiesSpec Vers 1
[9]VK_KHR_wayland_surfaceSpec Vers 6
[10]VK_KHR_xcb_surfaceSpec Vers 6
[11]VK_KHR_xlib_surfaceSpec Vers 6
[12]VK_KHR_displaySpec Vers 23
[13]VK_EXT_direct_mode_displaySpec Vers 1
[14]VK_EXT_acquire_xlib_displaySpec Vers 1
[15]VK_EXT_display_surface_counterSpec Vers 1
[16]VK_EXT_debug_reportSpec Vers 9
[17]VK_EXT_debug_utilsSpec Vers 1
vkCreateInstance [1.0]VIA_SUCCESSFUL
vkCreateInstance [1.1]VIA_SUCCESSFUL
2618 | 2619 | 2620 | 2621 | 2622 | 2623 | 2624 | 2625 | 2626 | 2627 | 2628 | 2629 | 2630 | 2631 | 2632 | 2633 | 2634 | 2635 | 2636 | 2637 | 2638 | 2639 | 2640 | 2641 | 2642 | 2643 | 2644 | 2645 | 2646 | 2647 | 2648 | 2649 | 2650 | 2651 | 2652 | 2653 | 2654 | 2655 | 2656 | 2657 | 2658 | 2659 | 2660 | 2661 | 2662 | 2663 | 2664 | 2665 | 2666 | 2667 | 2668 | 2669 | 2670 | 2671 | 2672 | 2673 | 2674 | 2675 | 2676 | 2677 | 2678 | 2679 | 2680 | 2681 | 2682 | 2683 | 2684 | 2685 | 2686 | 2687 | 2688 | 2689 | 2690 | 2691 | 2692 | 2693 | 2694 | 2695 | 2696 | 2697 | 2698 | 2699 | 2700 | 2701 | 2702 | 2703 | 2704 | 2705 | 2706 | 2707 | 2708 | 2709 | 2710 | 2711 | 2712 | 2713 | 2714 | 2715 | 2716 | 2717 | 2718 | 2719 | 2720 | 2721 | 2722 | 2723 | 2724 | 2725 | 2726 | 2727 | 2728 | 2729 | 2730 | 2731 | 2732 | 2733 | 2734 | 2735 | 2736 | 2737 | 2738 | 2739 | 2740 | 2741 | 2742 | 2743 | 2744 | 2745 | 2746 | 2747 | 2748 | 2749 | 2750 | 2751 | 2752 | 2753 | 2754 | 2755 | 2756 | 2757 | 2758 | 2759 | 2760 | 2761 | 2762 | 2763 | 2764 | 2765 | 2766 | 2767 | 2768 | 2769 | 2770 | 2771 | 2772 | 2773 | 2774 | 2775 | 2776 | 2777 | 2778 | 2779 | 2780 | 2781 | 2782 | 2783 | 2784 | 2785 | 2786 | 2787 | 2788 | 2789 | 2790 | 2791 | 2792 | 2793 | 2794 | 2795 | 2796 | 2797 | 2798 | 2799 | 2800 | 2801 | 2802 | 2803 | 2804 | 2805 | 2806 | 2807 | 2808 | 2809 | 2810 | 2811 | 2812 | 2813 | 2814 | 2815 | 2816 | 2817 | 2818 | 2819 | 2820 | 2821 | 2822 | 2823 | 2824 | 2825 | 2826 | 2827 | 2828 | 2829 | 2830 | 2831 | 2832 | 2833 | 2834 | 2835 | 2836 | 2837 | 2838 | 2839 | 2840 | 2841 | 2842 | 2843 | 2844 | 2845 | 2846 | 2847 | 2848 | 2849 | 2850 | 2851 | 2852 | 2853 | 2854 | 2855 | 2856 | 2857 | 2858 | 2859 | 2860 | 2861 | 2862 | 2863 | 2864 | 2865 | 2866 | 2867 | 2868 | 2869 | 2870 | 2871 | 2872 | 2873 | 2874 | 2875 | 2876 | 2877 | 2878 | 2879 | 2880 | 2881 | 2882 | 2883 | 2884 | 2885 | 2886 | 2887 | 2888 | 2889 | 2890 | 2891 | 2892 | 2893 | 2894 | 2895 | 2896 | 2897 | 2898 | 2899 | 2900 | 2901 | 2902 | 2903 | 2904 | 2905 | 2906 | 2907 | 2908 | 2909 | 2910 | 2911 | 2912 | 2913 | 2914 | 2915 | 2916 | 2917 | 2918 | 2919 | 2920 | 2921 | 2922 | 2923 | 2924 | 2925 | 2926 | 2927 | 2928 | 2929 | 2930 | 2931 | 2932 | 2933 | 2934 | 2935 | 2936 | 2937 | 2938 | 2939 | 2940 | 2941 | 2942 | 2943 | 2944 | 2945 | 2946 | 2947 | 2948 | 2949 | 2950 | 2951 | 2952 | 2953 | 2954 | 2955 | 2956 | 2957 | 2958 | 2959 | 2960 | 2961 | 2962 | 2963 | 2964 | 2965 | 2966 | 2967 | 2968 | 2969 | 2970 | 2971 | 2972 | 2973 | 2974 | 2975 | 2976 | 2977 | 2978 | 2979 | 2980 | 2981 | 2982 | 2983 | 2984 | 2985 | 2986 | 2987 | 2988 | 2989 | 2990 | 2991 | 2992 | 2993 | 2994 | 2995 | 2996 | 2997 | 2998 | 2999 | 3000 | 3001 | 3002 | 3003 | 3004 | 3005 | 3006 | 3007 | 3008 | 3009 | 3010 | 3011 | 3012 | 3013 | 3014 | 3015 | 3016 | 3017 | 3018 | 3019 | 3020 | 3021 | 3022 | 3023 | 3024 | 3025 | 3026 | 3027 | 3028 | 3029 | 3030 | 3031 | 3032 | 3033 | 3034 | 3035 | 3036 | 3037 | 3038 | 3039 | 3040 | 3041 | 3042 | 3043 | 3044 | 3045 | 3046 | 3047 | 3048 |
Physical Devices
vkEnumeratePhysicalDevices [1.0]1
[0]0x0x128de20
VendorAMD [0x1002]
Device NameAMD RADV RAVEN (LLVM 9.0.0)
Device ID0x15dd
Device TypeIntegrated GPU
Driver Version19.2.1
API Version1.1.107
Queue Families2
[0]Queue Count1
Queue FlagsGRAPHICS | COMPUTE | TRANSFER | SPARSE_BINDING
Timestamp Valid Bits0x40
Image Granularity
Width0x1
Height0x1
Depth0x1
[1]Queue Count4
Queue FlagsCOMPUTE | TRANSFER | SPARSE_BINDING
Timestamp Valid Bits0x40
Image Granularity
Width0x1
Height0x1
Depth0x1
Memory Heaps2
[0]Property FlagsDEVICE_LOCAL
Heap Size268435456
[1]Property FlagsDEVICE_LOCAL
Heap Size3221225472
Memory Types3
[0]Property FlagsDEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT
Heap Index0
[1]Property FlagsDEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT
Heap Index1
[2]Property FlagsDEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT | HOST_CACHED
Heap Index1
Device Extensions34
[0]VK_KHR_bind_memory2Spec Vers 1
[1]VK_KHR_dedicated_allocationSpec Vers 1
[2]VK_KHR_descriptor_update_templateSpec Vers 1
[3]VK_KHR_draw_indirect_countSpec Vers 1
[4]VK_KHR_get_memory_requirements2Spec Vers 1
[5]VK_KHR_image_format_listSpec Vers 1
[6]VK_KHR_imageless_framebufferSpec Vers 1
[7]VK_KHR_maintenance1Spec Vers 1
[8]VK_KHR_maintenance2Spec Vers 1
[9]VK_KHR_pipeline_executable_propertiesSpec Vers 1
[10]VK_KHR_relaxed_block_layoutSpec Vers 1
[11]VK_KHR_sampler_mirror_clamp_to_edgeSpec Vers 1
[12]VK_KHR_shader_draw_parametersSpec Vers 1
[13]VK_KHR_storage_buffer_storage_classSpec Vers 1
[14]VK_EXT_calibrated_timestampsSpec Vers 1
[15]VK_EXT_conditional_renderingSpec Vers 1
[16]VK_EXT_depth_clip_enableSpec Vers 1
[17]VK_EXT_depth_range_unrestrictedSpec Vers 1
[18]VK_EXT_global_prioritySpec Vers 1
[19]VK_EXT_index_type_uint8Spec Vers 1
[20]VK_EXT_pipeline_creation_feedbackSpec Vers 1
[21]VK_EXT_shader_viewport_index_layerSpec Vers 1
[22]VK_EXT_shader_stencil_exportSpec Vers 1
[23]VK_EXT_shader_subgroup_ballotSpec Vers 1
[24]VK_EXT_shader_subgroup_voteSpec Vers 1
[25]VK_AMD_buffer_markerSpec Vers 1
[26]VK_AMD_draw_indirect_countSpec Vers 1
[27]VK_AMD_gcn_shaderSpec Vers 1
[28]VK_AMD_gpu_shader_half_floatSpec Vers 1
[29]VK_AMD_gpu_shader_int16Spec Vers 1
[30]VK_AMD_shader_infoSpec Vers 1
[31]VK_AMD_shader_trinary_minmaxSpec Vers 1
[32]VK_GOOGLE_decorate_stringSpec Vers 1
[33]VK_GOOGLE_hlsl_functionality1Spec Vers 1
vkEnumeratePhysicalDevices [1.1]1
3049 | 3050 | 3051 | 3052 | 3053 | 3054 | 3055 | 3056 | 3057 | 3058 | 3059 | 3060 | 3061 | 3062 | 3063 | 3064 | 3065 | 3066 | 3067 | 3068 | 3069 | 3070 | 3071 | 3072 | 3073 |
Logical Devices
vkCreateDevice [1.0]1
[0]VIA_SUCCESSFUL
vkCreateDevice [1.1]1
[0]VIA_SUCCESSFUL
3074 | 3075 | 3076 | 3077 | 3078 | 3079 | 3080 | 3081 | 3082 | 3083 | 3084 | 3085 | 3086 | 3087 | 3088 | 3089 | 3090 | 3091 | 3092 | 3093 | 3094 | 3095 | 3096 | 3097 | 3098 | 3099 | 3100 | 3101 | 3102 | 3103 | 3104 | 3105 | 3106 | 3107 | 3108 | 3109 |
Cleanup
vkDestroyDevice [1.0]1
[0]VIA_SUCCESSFUL
vkDestroyInstance [1.0]VIA_SUCCESSFUL
vkDestroyDevice [1.1]1
[0]VIA_SUCCESSFUL
vkDestroyInstance [1.1]VIA_SUCCESSFUL
3110 |
3111 |
3112 |

External Tests

3113 | 3114 | 3115 | 3116 | 3117 | 3118 | 3119 | 3120 | 3121 | 3122 | 3123 | 3124 | 3125 |
Cube
./vkcube --c 100 --suppress_popupsVIA_SUCCESSFUL
./vkcube --c 100 --suppress_popups --validateVIA_SUCCESSFUL
3126 |
3127 |
3128 | 3129 | 3130 | 3131 | -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/xrgears.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/technobaboo/quick3d-openxr/e61c0c5de3b50ed7991b97dae84276d4f3371e76/examples/quick3d-openxr/xrgears/xrgears.blend -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/xrgears.pro: -------------------------------------------------------------------------------- 1 | QT += quick quick3d-private quick3d-openxr 2 | 3 | target.path = $$[QT_INSTALL_EXAMPLES]/quick3d-openxr/xrgears 4 | INSTALLS += target 5 | 6 | RESOURCES += \ 7 | resources.qrc 8 | 9 | SOURCES += \ 10 | main.cpp 11 | 12 | #Inspired by Collabora's XRGears demo (https://gitlab.freedesktop.org/monado/demos/xrgears) 13 | -------------------------------------------------------------------------------- /examples/quick3d-openxr/xrgears/xrgears.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.14 2 | import QtQuick3D 1.14 3 | import QtQuick3D.Materials 1.14 4 | import QtQuick3D.Helpers 1.14 5 | import QtQuick3D.OpenXR 1.0 6 | 7 | Node { 8 | id: scene 9 | 10 | SceneEnvironment { 11 | id: skybox 12 | backgroundMode: SceneEnvironment.Color 13 | clearColor: "#444" 14 | 15 | multisampleAAMode: SceneEnvironment.X4 16 | 17 | Component.onCompleted: OpenXR.setEnvironment(skybox) 18 | } 19 | 20 | Node { 21 | id:gears 22 | position: Qt.vector3d(-0.5, 1.15, 7) 23 | rotation: Qt.vector3d(-90, 0, 0) 24 | scale: Qt.vector3d(0.5, 0.5, 0.5) 25 | 26 | property real gearTurn: 0 27 | 28 | RotationAnimation on gearTurn { 29 | duration: 5000 30 | loops: Animation.Infinite 31 | from: 0 32 | to: 359 33 | direction: RotationAnimation.Clockwise 34 | running: true 35 | } 36 | 37 | PointLight { 38 | color: "white" 39 | // brightness: 1 40 | // ambientColor: "white" 41 | linearFade: 5 42 | 43 | position: Qt.vector3d(0.5, 3, 0.5) 44 | } 45 | 46 | Model { 47 | id: redGear 48 | source: "qrc:/RedGear.mesh" 49 | materials: GearMaterial { 50 | diffuseColor: "#f00" 51 | } 52 | 53 | rotation: Qt.vector3d(0, parent.gearTurn, 0) 54 | } 55 | 56 | Model { 57 | id: greenGear 58 | source: "qrc:/GreenGear.mesh" 59 | materials: GearMaterial { 60 | diffuseColor: "#0f0" 61 | } 62 | 63 | position: Qt.vector3d(3, 0, 0) 64 | rotation: Qt.vector3d(0, -parent.gearTurn*2, 0) 65 | } 66 | 67 | Model { 68 | id: blueGear 69 | source: "qrc:/BlueGear.mesh" 70 | materials: GearMaterial { 71 | diffuseColor: "#00f" 72 | } 73 | 74 | position: Qt.vector3d(0, 0, 3) 75 | rotation: Qt.vector3d(0, -parent.gearTurn*2, 0) 76 | } 77 | } 78 | 79 | AxisHelper { 80 | enableAxisLines: false 81 | enableXZGrid: true 82 | gridColor: "#ccc" 83 | gridOpacity: 1 84 | scale: Qt.vector3d(0.01, 0.01, 0.01) 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /quick3d-openxr.pro: -------------------------------------------------------------------------------- 1 | requires(qtHaveModule(quick3d-private)) 2 | 3 | load(qt_parts) 4 | 5 | TEMPLATE = subdirs 6 | SUBDIRS += src examples 7 | src.subdir = src 8 | examples.subdir = examples 9 | 10 | examples.depends = src 11 | -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm * 4 | 5 | qmake $1/stardust-xr.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug && /usr/bin/make qmake_all 6 | make 7 | -------------------------------------------------------------------------------- /src/quick3d-openxr/opengl.cpp: -------------------------------------------------------------------------------- 1 | #include "quick3d-openxr_meta.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | OpenGL::OpenGL(QObject *parent) : QObject(parent) { 11 | int fbOptions[11] = {GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, GLX_ALPHA_SIZE, 8, None}; 12 | memcpy(&framebufferOptions, &fbOptions, sizeof (fbOptions)); 13 | } 14 | 15 | void OpenGL::initialize() { 16 | //Temporarily make the context current 17 | graphics->glContext->doneCurrent(); 18 | graphics->glContext->makeCurrent(graphics->surface); 19 | 20 | nativeGLHandle = graphics->glContext->nativeHandle(); 21 | } 22 | 23 | Display *OpenGL::display() { 24 | return XOpenDisplay(nullptr); 25 | } 26 | 27 | GLXContext OpenGL::context() { 28 | if (strcmp(nativeGLHandle.typeName(), "QGLXNativeContext") == 0) { 29 | QGLXNativeContext nativeContext = qvariant_cast(nativeGLHandle); 30 | return nativeContext.context(); 31 | } 32 | } 33 | 34 | GLXDrawable OpenGL::drawable() { 35 | return 0x1; 36 | } 37 | 38 | GLXFBConfig *OpenGL::framebufferConfig() { 39 | int nelements = 0; 40 | return glXChooseFBConfig(display(), 0, framebufferOptions, &nelements); 41 | } 42 | -------------------------------------------------------------------------------- /src/quick3d-openxr/opengl.h: -------------------------------------------------------------------------------- 1 | #ifndef STARDUSTOPENGL_H 2 | #define STARDUSTOPENGL_H 3 | 4 | #include 5 | 6 | #include "openxr_meta.h" 7 | 8 | class OpenXR; 9 | class OpenXRGraphics; 10 | 11 | class OpenGL : public QObject 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit OpenGL(QObject *parent = nullptr); 16 | 17 | void initialize(); 18 | Display *display(); 19 | GLXContext context(); 20 | GLXDrawable drawable(); 21 | GLXFBConfig *framebufferConfig(); 22 | 23 | OpenXR *openxr; 24 | OpenXRGraphics *graphics; 25 | 26 | protected: 27 | QVariant nativeGLHandle; 28 | int framebufferOptions[11]; 29 | }; 30 | 31 | 32 | #endif // STARDUSTOPENGL_H 33 | -------------------------------------------------------------------------------- /src/quick3d-openxr/opengl_meta.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENGL_META_H 2 | #define OPENGL_META_H 3 | 4 | //class GLuint; 5 | 6 | //class Display; 7 | //class GLXContext; 8 | //class GLXDrawable; 9 | //class GLXFBConfig; 10 | 11 | #include "GL/glx.h" 12 | 13 | #define XR_USE_PLATFORM_XLIB 14 | #define XR_USE_GRAPHICS_API_OPENGL 15 | #define XR_KHR_opengl_enable 16 | 17 | #endif // OPENGL_META_H 18 | -------------------------------------------------------------------------------- /src/quick3d-openxr/openxr.cpp: -------------------------------------------------------------------------------- 1 | #include "quick3d-openxr_meta.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | OpenXR::OpenXR(QObject *parent) : QObject(parent) { 8 | } 9 | 10 | OpenXR::~OpenXR() { 11 | xrEndSession(*stardustSession); 12 | xrDestroySession(*stardustSession); 13 | xrDestroyInstance(*xrInstance); 14 | } 15 | 16 | void OpenXR::setupInfo() { 17 | strcpy(xrAppInfo->applicationName, QString("Stardust XR").toUtf8()); 18 | xrAppInfo->applicationVersion = 1; 19 | strcpy(xrAppInfo->engineName, QString("Qt").toUtf8()); 20 | xrAppInfo->engineVersion = 5; 21 | xrAppInfo->apiVersion = XR_CURRENT_API_VERSION; 22 | } 23 | 24 | void OpenXR::loadExtensions() { 25 | uint32_t extensionCount = 0; 26 | xrEnumerateInstanceExtensionProperties(nullptr, 0, &extensionCount, nullptr); 27 | 28 | qDebug() << "Runtime supports" << extensionCount << "extensions\n" << extensionCount; 29 | 30 | XrExtensionProperties extensionProperties[extensionCount]; 31 | for (uint16_t i = 0; i < extensionCount; i++) { 32 | // we usually have to fill in the type (for validation) and set 33 | // next to NULL (or a pointer to an extension specific struct) 34 | extensionProperties[i].type = XR_TYPE_EXTENSION_PROPERTIES; 35 | extensionProperties[i].next = nullptr; 36 | } 37 | 38 | xrEnumerateInstanceExtensionProperties(nullptr, extensionCount, &extensionCount, extensionProperties); 39 | 40 | if (!isExtensionSupported(XR_KHR_OPENGL_ENABLE_EXTENSION_NAME, extensionProperties, extensionCount)) { 41 | qDebug() << "Runtime does not support OpenGL extension!" << endl; 42 | } 43 | } 44 | 45 | void OpenXR::createInstance() { 46 | const char* const enabledExtensions[] = {XR_KHR_OPENGL_ENABLE_EXTENSION_NAME}; 47 | 48 | //XrInstanceCreateInfo *xrInstanceInfoXrInstanceCreateInfo *xrInstanceInfo 49 | xrInstanceInfo->type = XR_TYPE_INSTANCE_CREATE_INFO; 50 | xrInstanceInfo->next = nullptr; 51 | xrInstanceInfo->createFlags = 0; 52 | xrInstanceInfo->applicationInfo = *xrAppInfo; 53 | xrInstanceInfo->enabledApiLayerCount = 0; 54 | xrInstanceInfo->enabledExtensionCount = 1; 55 | xrInstanceInfo->enabledExtensionNames = enabledExtensions; 56 | 57 | //Create the OpenXR Instance 58 | XrResult xrResult = xrCreateInstance(xrInstanceInfo, xrInstance); 59 | } 60 | 61 | void OpenXR::loadSystem() { 62 | //XrSystemGetInfo 63 | hmdInfo->type = XR_TYPE_SYSTEM_GET_INFO; 64 | hmdInfo->next = nullptr; 65 | hmdInfo->formFactor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY; 66 | 67 | //XrSystemId *hmdID 68 | XrResult xrResult = xrGetSystem(*xrInstance, hmdInfo, hmdID); 69 | } 70 | 71 | XrGraphicsRequirementsOpenGLKHR OpenXR::graphicsRequirements() { 72 | XrGraphicsRequirementsOpenGLKHR graphicsRequirements{XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR}; 73 | 74 | PFN_xrGetOpenGLGraphicsRequirementsKHR pfnGetOpenGLGraphicsRequirementsKHR = nullptr; 75 | xrGetInstanceProcAddr(*xrInstance, "xrGetOpenGLGraphicsRequirementsKHR", (PFN_xrVoidFunction *)&pfnGetOpenGLGraphicsRequirementsKHR); 76 | pfnGetOpenGLGraphicsRequirementsKHR(*xrInstance, *hmdID, &graphicsRequirements); 77 | 78 | return graphicsRequirements; 79 | } 80 | 81 | void OpenXR::setupGraphics() { 82 | //Bind opengl to this OpenXR session 83 | openglBinding.xDisplay = opengl->display(); 84 | openglBinding.glxContext = opengl->context(); 85 | openglBinding.glxDrawable = opengl->drawable(); 86 | openglBinding.glxFBConfig = *opengl->framebufferConfig(); 87 | } 88 | 89 | void OpenXR::createSession() { 90 | //XrSessionCreateInfo *xrSessionInfo 91 | xrSessionInfo->type = XR_TYPE_SESSION_CREATE_INFO; 92 | xrSessionInfo->next = const_cast(&openglBinding); 93 | xrSessionInfo->systemId = *hmdID; 94 | xrSessionInfo->createFlags = 0; 95 | 96 | //XrSession *stardustSession; 97 | XrResult xrResult = xrCreateSession(*xrInstance, xrSessionInfo, stardustSession); 98 | } 99 | 100 | void OpenXR::startSession() { 101 | //Start the XrSession 102 | XrResult xrResult = xrBeginSession(*stardustSession, &beginInfo); 103 | 104 | qDebug() << "Initialized OpenXR" << endl; 105 | } 106 | 107 | bool OpenXR::isExtensionSupported(char *extensionName, XrExtensionProperties *instanceExtensionProperties, uint32_t instanceExtensionCount) { 108 | for (uint32_t supportedIndex = 0; supportedIndex < instanceExtensionCount; supportedIndex++) { 109 | if (!strcmp(extensionName, 110 | instanceExtensionProperties[supportedIndex].extensionName)) { 111 | return true; 112 | } 113 | } 114 | return false; 115 | } 116 | 117 | -------------------------------------------------------------------------------- /src/quick3d-openxr/openxr.h: -------------------------------------------------------------------------------- 1 | #ifndef STARDUSTOPENXR_H 2 | #define STARDUSTOPENXR_H 3 | 4 | #include 5 | 6 | #include "openxr_meta.h" 7 | 8 | class OpenGL; 9 | class OpenXRGraphics; 10 | 11 | class OpenXR : public QObject { 12 | Q_OBJECT 13 | Q_PROPERTY(OpenGL *opengl MEMBER opengl) 14 | public: 15 | explicit OpenXR(QObject *parent = nullptr); 16 | ~OpenXR(); 17 | 18 | OpenGL *opengl = nullptr; 19 | 20 | void setupInfo(); 21 | void loadExtensions(); 22 | void createInstance(); 23 | void loadSystem(); 24 | XrGraphicsRequirementsOpenGLKHR graphicsRequirements(); 25 | void setupGraphics(); 26 | void createSession(); 27 | void startSession(); 28 | 29 | XrApplicationInfo *xrAppInfo = new XrApplicationInfo; 30 | XrInstanceCreateInfo *xrInstanceInfo = new XrInstanceCreateInfo; 31 | XrInstance *xrInstance = new XrInstance; 32 | XrSystemGetInfo *hmdInfo = new XrSystemGetInfo; 33 | XrSystemId *hmdID = new XrSystemId; 34 | XrSessionCreateInfo *xrSessionInfo = new XrSessionCreateInfo; 35 | XrSession *stardustSession = new XrSession; 36 | 37 | std::vector *openglExtensionBuffer = new std::vector; 38 | 39 | // Xr vulkanBinding{XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR}; 40 | XrGraphicsBindingOpenGLXlibKHR openglBinding{XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR}; 41 | 42 | XrViewConfigurationType viewConfig{XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO}; 43 | 44 | XrSessionBeginInfo beginInfo{ 45 | XR_TYPE_SESSION_BEGIN_INFO, 46 | nullptr, 47 | viewConfig 48 | }; 49 | private: 50 | bool isExtensionSupported(char* extensionName, XrExtensionProperties* instanceExtensionProperties, uint32_t instanceExtensionCount); 51 | }; 52 | 53 | 54 | #endif // STARDUSTOPENXR_H 55 | -------------------------------------------------------------------------------- /src/quick3d-openxr/openxr_meta.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENXR_META_H 2 | #define OPENXR_META_H 3 | 4 | #include "opengl_meta.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #endif // OPENXR_META_H 12 | -------------------------------------------------------------------------------- /src/quick3d-openxr/openxrframe.cpp: -------------------------------------------------------------------------------- 1 | #include "quick3d-openxr_meta.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include 11 | 12 | #define RAD2DEG 180/3.14159 13 | 14 | OpenXRFrame::OpenXRFrame(QObject *parent) : QObject(parent) { 15 | } 16 | 17 | void OpenXRFrame::initialize() { 18 | bool isCurrent = graphics->glContext->makeCurrent(graphics->surface); 19 | 20 | (reinterpret_cast(graphics->glContext->getProcAddress("glBindFramebufferEXT")))( 21 | GL_FRAMEBUFFER, graphics->glFBO->handle() 22 | ); 23 | (reinterpret_cast(graphics->glContext->getProcAddress("glGenRenderbuffers")))( 24 | 1, &renderbuffer 25 | ); 26 | (reinterpret_cast(graphics->glContext->getProcAddress("glBindRenderbuffer")))( 27 | GL_RENDERBUFFER, renderbuffer 28 | ); 29 | (reinterpret_cast(graphics->glContext->getProcAddress("glRenderbufferStorage")))( 30 | GL_RENDERBUFFER, GL_RGBA8, 31 | graphics->totalSize.width(), 32 | graphics->totalSize.height() 33 | ); 34 | (reinterpret_cast(graphics->glContext->getProcAddress("glBindRenderbuffer")))( 35 | GL_RENDERBUFFER, 0 36 | ); 37 | (reinterpret_cast(graphics->glContext->getProcAddress("glFramebufferRenderbuffer")))( 38 | GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbuffer 39 | ); 40 | } 41 | 42 | void OpenXRFrame::startFrame() { 43 | // qDebug() << "Starting frame"; 44 | 45 | //Wait for next frame 46 | xrWaitFrame(*graphics->openxr->stardustSession, &graphics->frameWaitInfo, &graphics->frameState); 47 | 48 | //Begin drawing a new frame 49 | xrBeginFrame(*graphics->openxr->stardustSession, nullptr); 50 | 51 | //Update the parent's FPS value 52 | // qDebug() << "FPS:" << 1000000000/frameState.predictedDisplayTime; 53 | graphics->displayFPS = static_cast(1000000000/graphics->frameState.predictedDisplayTime); 54 | 55 | //Update view information 56 | graphics->viewLocateInfo.viewConfigurationType = graphics->openxr->viewConfig; 57 | graphics->viewLocateInfo.displayTime = graphics->frameState.predictedDisplayTime; 58 | graphics->viewLocateInfo.space = graphics->refSpace; 59 | 60 | //Locate views 61 | xrLocateViews(*graphics->openxr->stardustSession, &graphics->viewLocateInfo, &graphics->viewState, 2, nullptr, graphics->views.data()); 62 | 63 | //Do for each eye 64 | for(int i=0; i<2; i++) { 65 | //Grab the swapchain image 66 | xrAcquireSwapchainImage(graphics->swapchains[i], &acquireInfo, &graphics->swapchainImageIndices[i]); 67 | 68 | //Wait for when the swapchain images are ready to be written 69 | xrWaitSwapchainImage(graphics->swapchains[i], &waitInfo); 70 | 71 | //Get the current view (makes code neater)red 72 | XrView &view = graphics->views[i]; 73 | 74 | QQuick3DFrustumCamera *camera = graphics->cameras[i]; 75 | 76 | //Set the cameras' positon to the pose position 77 | QVector3D position = QVector3D( 78 | view.pose.position.x, 79 | -view.pose.position.y, 80 | view.pose.position.z 81 | ); 82 | camera->setPosition(position); 83 | 84 | //Set the cameras' orientation to match the orientation 85 | QQuaternion rotation = QQuaternion( 86 | view.pose.orientation.w, 87 | view.pose.orientation.x, 88 | view.pose.orientation.y, 89 | view.pose.orientation.z 90 | ); 91 | QVector3D euler = rotation.toEulerAngles(); 92 | 93 | camera->setRotation(QVector3D( 94 | euler.x(), 95 | euler.y(), 96 | euler.z()+180 97 | )); 98 | 99 | // eye->setIsFieldOfViewHorizontal(true); 100 | // eye->setFieldOfView((view.fov.angleRight-view.fov.angleLeft)*RAD2DEG); 101 | camera->setClipNear(0.001); 102 | 103 | camera->setTop (std::sin(view.fov.angleUp)*camera->clipNear()); 104 | camera->setBottom (std::sin(view.fov.angleDown)*camera->clipNear()); 105 | camera->setLeft (std::sin(view.fov.angleLeft)*camera->clipNear()); 106 | camera->setRight (std::sin(view.fov.angleRight)*camera->clipNear()); 107 | 108 | //Update properties on the XrFrameEndInfo and its dependencies 109 | graphics->stardustLayerViews[i].fov = view.fov; 110 | graphics->stardustLayerViews[i].pose = view.pose; 111 | graphics->stardustLayerViews[i].subImage = XrSwapchainSubImage { 112 | graphics->swapchains[i], 113 | XrRect2Di { 114 | XrOffset2Di {0, 0}, 115 | XrExtent2Di { 116 | graphics->eyeRects[i].width(), 117 | graphics->eyeRects[i].height() 118 | } 119 | }, 120 | graphics->swapchainImageIndices[i] 121 | }; 122 | } 123 | } 124 | 125 | void OpenXRFrame::renderFrame() { 126 | // qDebug() << "Rendering frame"; 127 | 128 | graphics->quickRenderer->polishItems(); 129 | graphics->quickRenderer->sync(); 130 | graphics->quickRenderer->render(); 131 | 132 | (reinterpret_cast(graphics->glContext->getProcAddress("glCopyImageSubData")))( 133 | renderbuffer, GL_RENDERBUFFER, 0, 134 | 0, 0, 0, 135 | graphics->openglImages[0][0], GL_TEXTURE_2D, 0, 136 | 0, 0, 0, 137 | graphics->eyeRects[0].width(), graphics->eyeRects[0].height(), 1 138 | ); 139 | (reinterpret_cast(graphics->glContext->getProcAddress("glCopyImageSubData")))( 140 | renderbuffer, GL_RENDERBUFFER, 0, 141 | graphics->eyeRects[1].width(), 0, 0, 142 | graphics->openglImages[1][0], GL_TEXTURE_2D, 0, 143 | 0, 0, 0, 144 | graphics->eyeRects[1].width(), graphics->eyeRects[1].height(), 1 145 | ); 146 | glFlush(); 147 | 148 | // bool fboValid = graphics->glFBO->isValid(); 149 | // QImage debugImage = graphics->glFBO->toImage(); 150 | // debugImage.save(QLatin1String("/tmp/quick3d-openxr_preview.png"), nullptr, 10); 151 | } 152 | 153 | void OpenXRFrame::endFrame() { 154 | // qDebug() << "Ending frame"; 155 | //Update properties on the XrFrameEndInfo and its dependencies 156 | XrCompositionLayerProjection stardustLayer = { 157 | XR_TYPE_COMPOSITION_LAYER_PROJECTION, 158 | nullptr, 159 | 0, 160 | graphics->refSpace, 161 | 2, 162 | graphics->stardustLayerViews 163 | }; 164 | std::vector layers; 165 | 166 | layers.push_back(reinterpret_cast(&stardustLayer)); 167 | 168 | XrFrameEndInfo endInfo = { 169 | XR_TYPE_FRAME_END_INFO, 170 | nullptr, 171 | graphics->frameState.predictedDisplayTime, 172 | XR_ENVIRONMENT_BLEND_MODE_OPAQUE, 173 | static_cast(layers.size()), 174 | layers.data() 175 | }; 176 | //Create release information 177 | XrSwapchainImageReleaseInfo releaseInfo = {XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO, nullptr}; 178 | 179 | //Release the swapchain images 180 | xrReleaseSwapchainImage(graphics->swapchains[0], &releaseInfo); 181 | xrReleaseSwapchainImage(graphics->swapchains[1], &releaseInfo); 182 | 183 | //End the drawing of the current frame 184 | xrEndFrame(*graphics->openxr->stardustSession, &endInfo); 185 | } 186 | -------------------------------------------------------------------------------- /src/quick3d-openxr/openxrframe.h: -------------------------------------------------------------------------------- 1 | #ifndef STARDUSTOPENXRFRAME_H 2 | #define STARDUSTOPENXRFRAME_H 3 | 4 | #include 5 | 6 | //#include 7 | //#include 8 | 9 | #include "openxr_meta.h" 10 | 11 | #include 12 | 13 | class OpenXRGraphics; 14 | 15 | class OpenXRFrame : public QObject { 16 | Q_OBJECT 17 | Q_PROPERTY(OpenXRGraphics *graphics MEMBER graphics) 18 | public: 19 | explicit OpenXRFrame(QObject *parent = nullptr); 20 | 21 | OpenXRGraphics *graphics = nullptr; 22 | void initialize(); 23 | 24 | void startFrame(); 25 | void renderFrame(); 26 | void endFrame(); 27 | 28 | private: 29 | 30 | void copyFrame(uint i); 31 | void initRenderControl(); 32 | 33 | //OpenGL helper functions 34 | void createTextureFromFD(int d); 35 | 36 | //OpenGL variables 37 | GLuint renderbuffer; 38 | GLuint colorTex; 39 | 40 | //OpenXR declarations 41 | XrSwapchainImageAcquireInfo acquireInfo{XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO, nullptr}; 42 | XrSwapchainImageWaitInfo waitInfo{XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO, nullptr}; 43 | }; 44 | 45 | 46 | #endif // STARDUSTOPENXRFRAME_H 47 | -------------------------------------------------------------------------------- /src/quick3d-openxr/openxrgraphics.cpp: -------------------------------------------------------------------------------- 1 | #include "quick3d-openxr_meta.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | OpenXRGraphics::OpenXRGraphics(QObject *parent) : QObject(parent) { 11 | } 12 | 13 | OpenXRGraphics::~OpenXRGraphics() { 14 | xrDestroySwapchain(swapchains[0]); 15 | xrDestroySwapchain(swapchains[1]); 16 | } 17 | 18 | void OpenXRGraphics::setupQtRendering() { 19 | //Set the OpenGL version 20 | glFormat = new QSurfaceFormat; 21 | glFormat->setProfile(QSurfaceFormat::CoreProfile); 22 | glFormat->setRenderableType(QSurfaceFormat::OpenGL); 23 | glFormat->setMajorVersion(4); 24 | glFormat->setMinorVersion(3); 25 | 26 | //Create the OpenGL view rendering 27 | glContext = new QOpenGLContext(this); 28 | bool contextCreated = glContext->create(); 29 | 30 | //Create the offscreen surface 31 | surface = new QOffscreenSurface; 32 | surface->setFormat(*glFormat); 33 | surface->create(); 34 | 35 | //Create QQuickRenderControl for both eyes 36 | quickRenderer = new QQuickRenderControl(this); 37 | window = new QQuickWindow(quickRenderer); 38 | window->setColor(Qt::transparent); 39 | } 40 | 41 | void OpenXRGraphics::getViewSizes() { 42 | //Get the stereo views' configuration properties 43 | xrGetViewConfigurationProperties(*openxr->xrInstance, *openxr->hmdID, openxr->viewConfig, &viewProperties); 44 | 45 | //Get the stereo views' configurations 46 | uint32_t viewCount = 2; 47 | xrEnumerateViewConfigurationViews(*openxr->xrInstance, *openxr->hmdID, openxr->viewConfig, viewCount, &viewCount, eyeData); 48 | 49 | //Do all this for both eyes 50 | for(int i=0; i<2; i++) { 51 | //Create the eyeRects 52 | eyeRects[i] = QRect(); 53 | eyeRects[1].setX(eyeData[0].recommendedImageRectHeight + (eyeData[0].recommendedImageRectHeight % 2)); 54 | 55 | //Update the eyeRects' extents 56 | eyeRects[i].setHeight(eyeData[i].recommendedImageRectHeight + (eyeData[i].recommendedImageRectHeight % 2)); 57 | eyeRects[i].setWidth(eyeData[i].recommendedImageRectWidth + (eyeData[i].recommendedImageRectHeight % 2)); 58 | } 59 | 60 | leftViewSize = eyeRects[0].size(); 61 | rightViewSize = eyeRects[1].size(); 62 | 63 | totalSize = QSize( 64 | eyeRects[0].width()+eyeRects[1].width(), 65 | std::max(eyeRects[0].height(), eyeRects[1].height()) 66 | ); 67 | } 68 | 69 | void OpenXRGraphics::initialize() { 70 | //Make the context current 71 | bool isCurrent = glContext->makeCurrent(surface); 72 | 73 | //Set the window bounds to the minimum to fit both views in case they are asymmetrical 74 | window->setGeometry(QRect(QPoint(0,0),totalSize)); 75 | 76 | //Create and link the FBO 77 | glFBO = new QOpenGLFramebufferObject(totalSize, QOpenGLFramebufferObject::NoAttachment, GL_TEXTURE_2D, GL_RGBA8); 78 | window->setRenderTarget(glFBO); 79 | 80 | //Start the Qt quick renderer 81 | quickRenderer->initialize(glContext); 82 | 83 | //Update the swapchain info's values 84 | swapInfo.width = eyeRects[0].width(); 85 | swapInfo.height = eyeRects[0].height(); 86 | swapInfo.sampleCount = eyeData[0].recommendedSwapchainSampleCount; 87 | 88 | //Do all this for both eyes 89 | for(int i=0; i<2; i++) { 90 | //Create the swapchains 91 | xrCreateSwapchain(*openxr->stardustSession, &swapInfo, &swapchains[i]); 92 | 93 | //Get the amount of swapchain images 94 | uint32_t swapchainLength = 0; 95 | xrEnumerateSwapchainImages(swapchains[i], 0, &swapchainLength, nullptr); 96 | 97 | assert(swapchainLength > 0); 98 | 99 | // Resize the swapchain-length for current eye i 100 | swapchainImages[i].resize(swapchainLength); 101 | for (uint32_t j = 0; j < swapchainLength; j++) 102 | swapchainImages[i][j].type = XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR; 103 | xrEnumerateSwapchainImages(swapchains[i], swapchainLength, &swapchainLength, reinterpret_cast(swapchainImages[i].data())); 104 | 105 | openglImages[i].resize(swapchainImages[i].size()); 106 | for (size_t j = 0; j < swapchainImages[i].size(); j++) 107 | openglImages[i][j] = swapchainImages[i][j].image; 108 | } 109 | 110 | //Create a reference space relative to the iz (floor) 111 | xrCreateReferenceSpace(*openxr->stardustSession, &refSpaceInfo, &refSpace); 112 | 113 | //Initialize views vector 114 | views = std::vector(2, XrView {XR_TYPE_VIEW, nullptr}); 115 | 116 | //Make the QML engine and components and so on 117 | if (!qmlEngine->incubationController()) 118 | qmlEngine->setIncubationController(window->incubationController()); 119 | } 120 | -------------------------------------------------------------------------------- /src/quick3d-openxr/openxrgraphics.h: -------------------------------------------------------------------------------- 1 | #ifndef STARDUSTOPENXRGRAPHICS_H 2 | #define STARDUSTOPENXRGRAPHICS_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "openxr_meta.h" 9 | #include 10 | 11 | class OpenXR; 12 | class OpenXRFrame; 13 | 14 | class QSurfaceFormat; 15 | class QOpenGLContext; 16 | class QOpenGLFramebufferObject; 17 | 18 | class QQuickWindow; 19 | class QQuickItem; 20 | class QQuickRenderControl; 21 | class QQmlComponent; 22 | class QQmlEngine; 23 | class QOffscreenSurface; 24 | 25 | class OpenXRGraphics : public QObject { 26 | Q_OBJECT 27 | public: 28 | explicit OpenXRGraphics(QObject *parent = nullptr); 29 | ~OpenXRGraphics(); 30 | 31 | OpenXR *openxr = nullptr; 32 | void setupQtRendering(); 33 | void getViewSizes(); 34 | void initialize(); 35 | 36 | uint displayFPS = 0; 37 | 38 | XrViewConfigurationProperties viewProperties{XR_TYPE_VIEW_CONFIGURATION_PROPERTIES}; 39 | XrViewConfigurationView eyeData[2]; 40 | 41 | XrSwapchainCreateInfo swapInfo = { 42 | XR_TYPE_SWAPCHAIN_CREATE_INFO, //XrStructureType type; 43 | nullptr, //const void* next; 44 | 0, //XrSwapchainCreateFlags createFlags; 45 | XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT | XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT, //XrSwapchainUsageFlags usageFlags; 46 | GL_RGBA8, //int64_t format; 47 | 1, //uint32_t sampleCount; 48 | 1, //uint32_t width; 49 | 1, //uint32_t height; 50 | 1, //uint32_t faceCount; 51 | 1, //uint32_t arraySize; 52 | 1 //uint32_t mipCount; 53 | }; 54 | XrSwapchain swapchains[2]; 55 | 56 | uint32_t swapchainImageCount = 0; 57 | XrSwapchainImageOpenGLKHR swapchainImageTemplate = { 58 | XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR, 59 | nullptr, 60 | 0 61 | }; 62 | std::vector swapchainImages[2]; 63 | uint32_t swapchainImageIndices[2]; 64 | 65 | XrReferenceSpaceCreateInfo refSpaceInfo = { 66 | XR_TYPE_REFERENCE_SPACE_CREATE_INFO, 67 | nullptr, 68 | XR_REFERENCE_SPACE_TYPE_STAGE, 69 | XrPosef { 70 | XrQuaternionf {0.0f,0.0f,1.0f,0.0f}, 71 | XrVector3f {0.0f,0.0f,0.0f} 72 | } 73 | }; 74 | XrSpace refSpace = XR_NULL_HANDLE; 75 | 76 | XrViewLocateInfo viewLocateInfo = { 77 | XR_TYPE_VIEW_LOCATE_INFO, 78 | nullptr 79 | }; 80 | XrViewState viewState = { 81 | XR_TYPE_VIEW_STATE, 82 | nullptr 83 | }; 84 | 85 | QRect eyeRects[2]; 86 | 87 | XrCompositionLayerProjectionView stardustLayerViews[2] = { 88 | XrCompositionLayerProjectionView { 89 | XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW, 90 | nullptr 91 | }, 92 | XrCompositionLayerProjectionView { 93 | XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW, 94 | nullptr 95 | } 96 | }; 97 | 98 | std::vector views; 99 | 100 | std::vector cameras; 101 | 102 | QSize leftViewSize; 103 | QSize rightViewSize; 104 | 105 | QSize totalSize; 106 | 107 | QSurfaceFormat *glFormat; 108 | QOpenGLContext *glContext; 109 | QOffscreenSurface *surface; 110 | QQuickWindow *window; 111 | QQuickRenderControl *quickRenderer; 112 | QOpenGLFramebufferObject *glFBO; 113 | 114 | QQmlEngine *qmlEngine; 115 | QQmlComponent *qmlComponent; 116 | 117 | std::vectoropenglImages[2]; 118 | 119 | XrFrameWaitInfo frameWaitInfo{XR_TYPE_FRAME_WAIT_INFO}; 120 | XrFrameState frameState{XR_TYPE_FRAME_STATE}; 121 | 122 | signals: 123 | void startFrameLoop(); 124 | }; 125 | 126 | 127 | #endif // STARDUSTOPENXRGRAPHICS_H 128 | -------------------------------------------------------------------------------- /src/quick3d-openxr/openxrrenderthread.cpp: -------------------------------------------------------------------------------- 1 | #include "openxrrenderthread.h" 2 | 3 | OpenXRRenderThread::OpenXRRenderThread(QQuick3DNode *sceneRoot, QQmlEngine *engine) : QThread(sceneRoot) { 4 | mainQmlEngine = engine; 5 | this->sceneRoot = sceneRoot; 6 | 7 | frameTimer = new QElapsedTimer(); 8 | } 9 | 10 | void OpenXRRenderThread::run() { 11 | 12 | //Create all OpenXR object classes 13 | opengl = new OpenGL(); 14 | openxr = new OpenXR(); 15 | graphics = new OpenXRGraphics(); 16 | frame = new OpenXRFrame(); 17 | 18 | //Link everything together 19 | opengl->openxr = openxr; 20 | openxr->opengl = opengl; 21 | opengl->graphics = graphics; 22 | graphics->openxr = openxr; 23 | graphics->qmlEngine = mainQmlEngine; 24 | frame->graphics = graphics; 25 | 26 | //Set up OpenXR 27 | openxr->setupInfo(); 28 | openxr->loadExtensions(); 29 | openxr->createInstance(); 30 | openxr->loadSystem(); 31 | graphics->setupQtRendering(); 32 | opengl->initialize(); 33 | openxr->setupGraphics(); 34 | openxr->createSession(); 35 | openxr->startSession(); 36 | graphics->getViewSizes(); 37 | 38 | //Set up the window 39 | leftView = new QQuick3DViewport(graphics->window->contentItem()); 40 | rightView = new QQuick3DViewport(graphics->window->contentItem()); 41 | 42 | //Align and size the viewports 43 | leftView ->setSize(graphics->leftViewSize ); 44 | rightView->setSize(graphics->rightViewSize); 45 | rightView->setPosition(QPoint(graphics->leftViewSize.width(), 0)); 46 | 47 | //Add in the cameras for the scenegraph 48 | leftCamera = new QQuick3DFrustumCamera(); 49 | rightCamera = new QQuick3DFrustumCamera(); 50 | 51 | leftCamera ->setParentItem(sceneRoot); 52 | rightCamera->setParentItem(sceneRoot); 53 | 54 | //Link the viewports to the cameras and scenes 55 | leftView ->setCamera(leftCamera ); 56 | rightView->setCamera(rightCamera); 57 | 58 | leftView ->setImportScene(sceneRoot); 59 | rightView->setImportScene(sceneRoot); 60 | 61 | //Link the cameras to the graphics 62 | graphics->cameras = {leftCamera, rightCamera}; 63 | 64 | graphics->initialize(); 65 | 66 | sceneRoot->moveToThread(QCoreApplication::instance()->thread()); 67 | emit renderReady(); 68 | frame->initialize(); 69 | 70 | 71 | for(;;) { 72 | frameTimer->start(); 73 | 74 | emit renderFrame(); 75 | frame->startFrame(); 76 | frame->renderFrame(); 77 | frame->endFrame(); 78 | 79 | fps = 1000/frameTimer->elapsed(); 80 | // qDebug() << "FPS: " << fps << endl; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/quick3d-openxr/openxrrenderthread.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENXRRENDERTHREAD_H 2 | #define OPENXRRENDERTHREAD_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include "quick3d-openxr_meta.h" 13 | 14 | class OpenXRRenderThread : public QThread 15 | { 16 | Q_OBJECT 17 | void run(); 18 | public: 19 | explicit OpenXRRenderThread(QQuick3DNode *sceneRoot, QQmlEngine *engine); 20 | 21 | OpenXR *openxr; 22 | OpenGL *opengl; 23 | OpenXRGraphics *graphics; 24 | OpenXRFrame *frame; 25 | 26 | QQmlEngine *mainQmlEngine; 27 | 28 | QQuick3DNode *sceneRoot; 29 | 30 | QQuick3DViewport *leftView; 31 | QQuick3DViewport *rightView; 32 | 33 | QQuick3DFrustumCamera *leftCamera; 34 | QQuick3DFrustumCamera *rightCamera; 35 | 36 | signals: 37 | void renderReady(); 38 | void renderFrame(); 39 | 40 | private: 41 | //FPS Timing 42 | QElapsedTimer *frameTimer; 43 | float fps = 0; 44 | }; 45 | 46 | #endif // OPENXRRENDERTHREAD_H 47 | -------------------------------------------------------------------------------- /src/quick3d-openxr/qopenxrapplication.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "qopenxrapplication.h" 5 | 6 | #include 7 | 8 | #include 9 | 10 | QOpenXRApplication::QOpenXRApplication(QObject *parent) : QObject(parent) { 11 | sceneRoot = new QQuick3DNode(); 12 | } 13 | 14 | QOpenXRApplication::~QOpenXRApplication() { 15 | 16 | } 17 | 18 | void QOpenXRApplication::initialize(QQmlEngine *engine, QQmlComponent *component) { 19 | qDebug() << "Creating new OpenXR session" << endl; 20 | 21 | mainQmlEngine = engine; 22 | sceneComponent = component; 23 | 24 | if(sceneComponent->isError()) { 25 | qDebug() << "QML errors:" << sceneComponent->errors() << endl; 26 | } 27 | 28 | renderThread = new OpenXRRenderThread(sceneRoot, mainQmlEngine); 29 | connect(renderThread, &OpenXRRenderThread::renderReady, this, &QOpenXRApplication::renderReady, Qt::QueuedConnection); 30 | connect(renderThread, &OpenXRRenderThread::renderFrame, this, &QOpenXRApplication::renderFrame, Qt::QueuedConnection); 31 | sceneRoot->moveToThread(renderThread); 32 | renderThread->start(QThread::TimeCriticalPriority); 33 | } 34 | 35 | void QOpenXRApplication::setEnvironment(QQuick3DSceneEnvironment *environment) { 36 | qDebug() << "Set Environment Map" << endl; 37 | renderThread->leftView ->setEnvironment(environment); 38 | renderThread->rightView->setEnvironment(environment); 39 | this->environment = environment; 40 | } 41 | 42 | void QOpenXRApplication::renderReady() { 43 | //Create QML component for the scene and instantiate an instance 44 | sceneObject = sceneComponent->create(); 45 | QQuick3DObject *scene3DObject = qobject_cast(sceneObject); 46 | scene3DObject->setParentItem(sceneRoot); 47 | scene3DObject->setParent(sceneRoot); 48 | 49 | emit ready(); 50 | } 51 | 52 | void QOpenXRApplication::renderFrame() { 53 | gazePosition = (renderThread->leftCamera->scenePosition() + renderThread->rightCamera->scenePosition())/2; 54 | gazeDirection = (renderThread->leftCamera->forward() + renderThread->rightCamera->forward())/2; 55 | 56 | emit gazePositionChanged(); 57 | emit gazeDirectionChanged(); 58 | emit frame(); 59 | } 60 | 61 | QVector3D QOpenXRApplication::getGazeDirection() const 62 | { 63 | return gazeDirection; 64 | } 65 | 66 | QVector3D QOpenXRApplication::getGazePosition() const 67 | { 68 | return gazePosition; 69 | } 70 | 71 | //void QOpenXRApplication::setSceneRoot(QQuick3DObject root) { 72 | // sceneRoot = root; 73 | // root.setParentItem() 74 | //} 75 | -------------------------------------------------------------------------------- /src/quick3d-openxr/qopenxrapplication.h: -------------------------------------------------------------------------------- 1 | #ifndef QOPENXRAPPLICATION_H 2 | #define QOPENXRAPPLICATION_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "openxrrenderthread.h" 10 | 11 | class QQmlEngine; 12 | class QQuickItem; 13 | 14 | class QUICK3DOPENXR_EXPORT QOpenXRApplication : public QObject { 15 | Q_OBJECT 16 | Q_PROPERTY(QVector3D gazePosition READ getGazePosition NOTIFY gazePositionChanged) 17 | Q_PROPERTY(QVector3D gazeDirection READ getGazeDirection NOTIFY gazeDirectionChanged) 18 | public: 19 | QOpenXRApplication(QObject *parent = nullptr); 20 | virtual ~QOpenXRApplication(); 21 | 22 | void initialize(QQmlEngine *engine, QQmlComponent *component); 23 | Q_INVOKABLE void setEnvironment(QQuick3DSceneEnvironment *environment); 24 | // void setSceneRoot(QQuick3DObject *root); 25 | 26 | QVector3D getGazePosition() const; 27 | QVector3D getGazeDirection() const; 28 | 29 | signals: 30 | void ready(); 31 | void frame(); 32 | void gazePositionChanged(); 33 | void gazeDirectionChanged(); 34 | 35 | protected slots: 36 | void renderReady(); 37 | void renderFrame(); 38 | 39 | protected: 40 | QObject *sceneObject; 41 | QQuickItem *rootItem; 42 | 43 | QQmlEngine *mainQmlEngine; 44 | QQmlComponent *sceneComponent; 45 | 46 | QQuick3DNode *sceneRoot; 47 | QQuick3DSceneEnvironment *environment; 48 | OpenXRRenderThread *renderThread; 49 | 50 | QVector3D gazePosition; 51 | QVector3D gazeDirection; 52 | }; 53 | 54 | #endif // QOPENXRAPPLICATION_H 55 | -------------------------------------------------------------------------------- /src/quick3d-openxr/quick3d-openxr.pro: -------------------------------------------------------------------------------- 1 | TARGET = Quick3DOpenXR 2 | MODULE = quick3d-openxr 3 | 4 | QT += qml quick quick3d-private openglextensions 5 | CONFIG += c++11 6 | 7 | LIBS += -lopenxr_loader \ 8 | -lGLEW \ 9 | -lglfw \ 10 | -lX11 11 | 12 | DEFINES += QUICK3DOPENXR_MODULE 13 | 14 | SOURCES += \ 15 | openxrrenderthread.cpp \ 16 | qopenxrapplication.cpp \ 17 | opengl.cpp \ 18 | openxr.cpp \ 19 | openxrgraphics.cpp \ 20 | openxrframe.cpp 21 | 22 | HEADERS += \ 23 | opengl_meta.h \ 24 | openxr_meta.h \ 25 | opengl.h \ 26 | openxr.h \ 27 | openxrgraphics.h \ 28 | openxrframe.h \ 29 | openxrrenderthread.h \ 30 | qopenxrapplication.h \ 31 | quick3d-openxr_global.h \ 32 | quick3d-openxr_meta.h 33 | 34 | load(qt_module) 35 | -------------------------------------------------------------------------------- /src/quick3d-openxr/quick3d-openxr_global.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if defined(QUICK3DOPENXR_MODULE) 4 | #define QUICK3DOPENXR_EXPORT Q_DECL_EXPORT 5 | #else 6 | #define QUICK3DOPENXR_EXPORT Q_DECL_IMPORT 7 | #endif 8 | -------------------------------------------------------------------------------- /src/quick3d-openxr/quick3d-openxr_meta.h: -------------------------------------------------------------------------------- 1 | #ifndef QUICK3DOPENXR_META_H 2 | #define QUICK3DOPENXR_META_H 3 | 4 | #include "quick3d-openxr_global.h" 5 | #include "opengl.h" 6 | #include "openxr.h" 7 | #include "openxrgraphics.h" 8 | #include "openxrframe.h" 9 | 10 | #endif // QUICK3DOPENXR_META_H 11 | -------------------------------------------------------------------------------- /src/src.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS += \ 3 | quick3d-openxr 4 | -------------------------------------------------------------------------------- /sync.profile: -------------------------------------------------------------------------------- 1 | %modules = ( # path to module name map 2 | "Quick3DOpenXR" => "$basedir/src/quick3d-openxr", 3 | ); 4 | %dependencies = ( 5 | "qtquick3d" => "", 6 | ); 7 | -------------------------------------------------------------------------------- /tests/auto/auto.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = cmake 3 | -------------------------------------------------------------------------------- /tests/auto/cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(qmake_cmake_files) 4 | 5 | enable_testing() 6 | 7 | find_package(Qt5Core REQUIRED) 8 | 9 | include("${_Qt5CTestMacros}") 10 | 11 | test_module_includes( 12 | ) 13 | -------------------------------------------------------------------------------- /tests/auto/cmake/cmake.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | 3 | CMAKE_QT_MODULES_UNDER_TEST = quick3d-openxr 4 | 5 | CONFIG += ctest_testcase 6 | -------------------------------------------------------------------------------- /tests/tests.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = auto 3 | --------------------------------------------------------------------------------