Move QtVulkanSupport into QtGui and QtOpenGL

Task-number: QTBUG-83255
Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-03-31 12:25:43 +02:00
parent 948134371e
commit 7a1650e343
32 changed files with 34 additions and 126 deletions

View File

@ -695,6 +695,7 @@ qt_extend_target(Gui CONDITION QT_FEATURE_vulkan
vulkan/qvulkanfunctions.cpp
vulkan/qvulkaninstance.cpp vulkan/qvulkaninstance.h
vulkan/qvulkanwindow.cpp vulkan/qvulkanwindow.h vulkan/qvulkanwindow_p.h
vulkan/qbasicvulkanplatforminstance.cpp vulkan/qbasicvulkanplatforminstance_p.h
PUBLIC_LIBRARIES
Vulkan::Vulkan_nolink
)

View File

@ -51,6 +51,8 @@
// We mean it.
//
#include <QtGui/qtguiglobal.h>
#include <QtCore/QLibrary>
#include <qpa/qplatformvulkaninstance.h>
@ -58,7 +60,7 @@ QT_BEGIN_NAMESPACE
class QLibrary;
class QBasicPlatformVulkanInstance : public QPlatformVulkanInstance
class Q_GUI_EXPORT QBasicPlatformVulkanInstance : public QPlatformVulkanInstance
{
public:
QBasicPlatformVulkanInstance();

View File

@ -61,7 +61,7 @@
QT_BEGIN_NAMESPACE
class QVulkanWindowPrivate : public QWindowPrivate
class Q_GUI_EXPORT QVulkanWindowPrivate : public QWindowPrivate
{
Q_DECLARE_PUBLIC(QVulkanWindow)

View File

@ -5,13 +5,15 @@ qtConfig(vulkan) {
vulkan/qvulkaninstance.h \
vulkan/qplatformvulkaninstance.h \
vulkan/qvulkanwindow.h \
vulkan/qvulkanwindow_p.h
vulkan/qvulkanwindow_p.h \
vulkan/qbasicvulkanplatforminstance_p.h
SOURCES += \
vulkan/qvulkaninstance.cpp \
vulkan/qplatformvulkaninstance.cpp \
vulkan/qvulkanfunctions.cpp \
vulkan/qvulkanwindow.cpp
vulkan/qvulkanwindow.cpp \
vulkan/qbasicvulkanplatforminstance.cpp
# Applications must inherit the Vulkan header include path.
QMAKE_USE += vulkan/nolink

View File

@ -84,6 +84,14 @@ qt_extend_target(OpenGL CONDITION NOT QT_FEATURE_opengles2
qopenglqueryhelper_p.h
qopengltimerquery.cpp qopengltimerquery.h
)
qt_extend_target(OpenGL CONDITION QT_FEATURE_vulkan
SOURCES
qvkconvenience.cpp qvkconvenience_p.h
PUBLIC_LIBRARIES
Vulkan::Vulkan_nolink
)
qt_add_docs(OpenGL
doc/qtopengl.qdocconf
)

View File

@ -129,4 +129,14 @@ qtConfig(opengles2) {
SOURCES += qopenglfunctions_es2.cpp
}
qtConfig(vulkan) {
CONFIG += generated_privates
HEADERS += qvkconvenience_p.h
SOURCES += qvkconvenience.cpp
# Applications must inherit the Vulkan header include path.
QMAKE_USE += vulkan/nolink
}
load(qt_module)

View File

@ -51,12 +51,12 @@
// We mean it.
//
#include <QtCore/qglobal.h>
#include <QtOpenGL/qtopenglglobal.h>
#include <qvulkaninstance.h>
QT_BEGIN_NAMESPACE
class QVkConvenience
class Q_OPENGL_EXPORT QVkConvenience
{
public:
#if QT_CONFIG(opengl)

View File

@ -40,6 +40,3 @@ endif()
if(QT_FEATURE_accessibility AND WIN32 AND NOT WINRT)
add_subdirectory(windowsuiautomation)
endif()
if(QT_FEATURE_vulkan)
add_subdirectory(vkconvenience)
endif()

View File

@ -37,9 +37,6 @@ qtConfig(accessibility) {
win32:!winrt: SUBDIRS += windowsuiautomation
}
qtConfig(vulkan): \
SUBDIRS += vkconvenience
!android:linux*:qtHaveModule(dbus) \
SUBDIRS += linuxofono

View File

@ -1,31 +0,0 @@
# Generated from vkconvenience.pro.
#####################################################################
## VulkanSupport Module:
#####################################################################
qt_add_module(VulkanSupport
STATIC
INTERNAL_MODULE
SOURCES
qbasicvulkanplatforminstance.cpp qbasicvulkanplatforminstance_p.h
qvkconvenience.cpp qvkconvenience_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
#### Keys ignored in scope 1:.:.:vkconvenience.pro:<TRUE>:
# MODULE = "vulkan_support"
## Scopes:
#####################################################################
qt_extend_target(VulkanSupport CONDITION QT_FEATURE_opengl
PUBLIC_LIBRARIES
Qt::OpenGL
)

View File

@ -1,33 +0,0 @@
# Generated from vkconvenience.pro.
qt_find_package(Vulkan) # special case
#####################################################################
## VulkanSupport Module:
#####################################################################
qt_add_module(VulkanSupport
STATIC
INTERNAL_MODULE
SOURCES
qbasicvulkanplatforminstance.cpp qbasicvulkanplatforminstance_p.h
qvkconvenience.cpp qvkconvenience_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
#### Keys ignored in scope 1:.:.:vkconvenience.pro:<TRUE>:
# MODULE = "vulkan_support"
## Scopes:
#####################################################################
qt_extend_target(VulkanSupport CONDITION QT_FEATURE_opengl
PUBLIC_LIBRARIES
Qt::OpenGL
)

View File

@ -1,20 +0,0 @@
TARGET = QtVulkanSupport
MODULE = vulkan_support
QT = core-private gui-private
qtConfig(opengl): QT += opengl
CONFIG += static internal_module
DEFINES += QT_NO_CAST_FROM_ASCII
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
SOURCES += \
qvkconvenience.cpp \
qbasicvulkanplatforminstance.cpp
HEADERS += \
qvkconvenience_p.h \
qbasicvulkanplatforminstance_p.h
load(qt_module)

View File

@ -74,8 +74,6 @@ qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_vulkan
SOURCES
qandroidplatformvulkaninstance.cpp qandroidplatformvulkaninstance.h
qandroidplatformvulkanwindow.cpp qandroidplatformvulkanwindow.h
PUBLIC_LIBRARIES
Qt::VulkanSupportPrivate
)
qt_extend_target(QAndroidIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate

View File

@ -7,8 +7,6 @@ QT += \
eventdispatcher_support-private accessibility_support-private \
fontdatabase_support-private egl_support-private
qtConfig(vulkan): QT += vulkan_support-private
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
OTHER_FILES += $$PWD/android.json

View File

@ -40,7 +40,7 @@
#ifndef QANDROIDPLATFORMVULKANINSTANCE_H
#define QANDROIDPLATFORMVULKANINSTANCE_H
#include <QtVulkanSupport/private/qbasicvulkanplatforminstance_p.h>
#include <QtGui/private/qbasicvulkanplatforminstance_p.h>
#include <QLibrary>
QT_BEGIN_NAMESPACE

View File

@ -93,8 +93,6 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_opengl
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_vulkan
SOURCES
qcocoavulkaninstance.h qcocoavulkaninstance.mm
PUBLIC_LIBRARIES
Qt::VulkanSupportPrivate
)
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_accessibility

View File

@ -99,8 +99,6 @@ QT += \
theme_support-private \
fontdatabase_support-private
qtConfig(vulkan): QT += vulkan_support-private
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
CONFIG += no_app_extension_api_only

View File

@ -47,7 +47,7 @@
#include <MoltenVK/mvk_vulkan.h>
#include <QtCore/QHash>
#include <QtVulkanSupport/private/qbasicvulkanplatforminstance_p.h>
#include <QtGui/private/qbasicvulkanplatforminstance_p.h>
#include <AppKit/AppKit.h>

View File

@ -6,7 +6,6 @@ QT += \
fontdatabase_support-private theme_support-private
qtConfig(accessibility): QT += accessibility_support-private
qtConfig(vulkan): QT += vulkan_support-private
LIBS += -ldwmapi -lversion
QMAKE_USE_PRIVATE += gdi32 dwrite_1 d2d1_1 d3d11_1 dxgi1_2

View File

@ -53,8 +53,6 @@ qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_vulkan
SOURCES
api/vulkan/qeglfsvulkaninstance.cpp api/vulkan/qeglfsvulkaninstance_p.h
api/vulkan/qeglfsvulkanwindow.cpp api/vulkan/qeglfsvulkanwindow_p.h
PUBLIC_LIBRARIES
Qt::VulkanSupportPrivate
)
# special case:

View File

@ -52,7 +52,7 @@
//
#include "qeglfsglobal_p.h"
#include <QtVulkanSupport/private/qbasicvulkanplatforminstance_p.h>
#include <QtGui/private/qbasicvulkanplatforminstance_p.h>
QT_BEGIN_NAMESPACE

View File

@ -20,9 +20,6 @@ qtHaveModule(input_support-private): \
qtHaveModule(platformcompositor_support-private): \
QT += platformcompositor_support-private
qtConfig(vulkan): \
QT += vulkan_support-private
# Avoid X11 header collision, use generic EGL native types
DEFINES += QT_EGL_NO_X11

View File

@ -120,8 +120,6 @@ qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_vulkan
SOURCES
qwindowsvulkaninstance.cpp qwindowsvulkaninstance.h
PUBLIC_LIBRARIES
Qt::VulkanSupportPrivate
)
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_directwrite3

View File

@ -46,7 +46,7 @@
#define VK_USE_PLATFORM_WIN32_KHR
#include <QtVulkanSupport/private/qbasicvulkanplatforminstance_p.h>
#include <QtGui/private/qbasicvulkanplatforminstance_p.h>
#include <QtCore/qlibrary.h>
QT_BEGIN_NAMESPACE

View File

@ -8,7 +8,6 @@ QT += \
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
qtConfig(accessibility): QT += accessibility_support-private
qtConfig(vulkan): QT += vulkan_support-private
qtConfig(directwrite3): DEFINES *= QT_USE_DIRECTWRITE2 QT_USE_DIRECTWRITE3

View File

@ -81,8 +81,6 @@ qt_extend_target(XcbQpa CONDITION QT_FEATURE_vulkan
SOURCES
qxcbvulkaninstance.cpp qxcbvulkaninstance.h
qxcbvulkanwindow.cpp qxcbvulkanwindow.h
PUBLIC_LIBRARIES
Qt::VulkanSupportPrivate
)
qt_extend_target(XcbQpa CONDITION QT_FEATURE_glib

View File

@ -46,7 +46,7 @@
#define VK_USE_PLATFORM_XCB_KHR
#include <QtVulkanSupport/private/qbasicvulkanplatforminstance_p.h>
#include <QtGui/private/qbasicvulkanplatforminstance_p.h>
#include <QLibrary>
QT_BEGIN_NAMESPACE

View File

@ -15,8 +15,6 @@ qtHaveModule(platformcompositor_support-private): \
qtHaveModule(linuxaccessibility_support-private): \
QT += linuxaccessibility_support-private
qtConfig(vulkan): QT += vulkan_support-private
qtConfig(glib) : QMAKE_USE_PRIVATE += glib
SOURCES = \

View File

@ -27,7 +27,6 @@
"QtGlxSupport" => "$basedir/src/platformsupport/glxconvenience",
"QtKmsSupport" => "$basedir/src/platformsupport/kmsconvenience",
"QtEdidSupport" => "$basedir/src/platformsupport/edid",
"QtVulkanSupport" => "$basedir/src/platformsupport/vkconvenience",
"QtLinuxOfonoSupport" => "$basedir/src/platformsupport/linuxofono",
"QtPlatformHeaders" => "$basedir/src/platformheaders",
"QtANGLE/KHR" => "!$basedir/src/3rdparty/angle/include/KHR",

View File

@ -329,9 +329,6 @@ _qt_library_map = [
LibraryMapping(
"virtualkeyboard", "Qt6", "Qt::VirtualKeyboard", extra=["COMPONENTS", "VirtualKeyboard"]
),
LibraryMapping(
"vulkan_support", "Qt6", "Qt::VulkanSupport", extra=["COMPONENTS", "VulkanSupport"]
),
LibraryMapping(
"waylandclient", "Qt6", "Qt::WaylandClient", extra=["COMPONENTS", "WaylandClient"]
),