Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
rhi_support_p.h
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
//
5
// W A R N I N G
6
// -------------
7
//
8
// This file is not part of the Qt API. It exists purely as an
9
// implementation detail. This header file may change from version to
10
// version without notice, or even be removed.
11
//
12
// We mean it.
13
//
14
15
#
ifndef
RHI_SUPPORT_P_H
16
#
define
RHI_SUPPORT_P_H
17
18
#
include
<
QtGui
/
qoffscreensurface
.
h
>
19
#
include
<
QtGui
/
rhi
/
qrhi
.
h
>
20
#
include
<
QtCore
/
private
/
qexpected_p
.
h
>
21
22
#
include
<
memory
>
23
24
#
if
defined
(
Q_OS_WIN
)
25
#
include
<
QtMultimediaTestLib
/
private
/
qwindowsd3d11testdevicecontext_p
.
h
>
26
#
endif
27
#
if
QT_CONFIG
(
vulkan
)
28
#
include
<
QtGui
/
qvulkaninstance
.
h
>
29
#
endif
30
31
QT_BEGIN_NAMESPACE
32
33
namespace
QtMultimediaTest
{
34
35
std
::
unique_ptr
<
QRhi
>
createNullRhi
();
36
37
#
if
QT_CONFIG
(
opengl
)
38
struct
OffscreenGlRhi
39
{
40
// the QRhi must be destroyed before the QOffscreenSurface it was built from.
41
std
::
unique_ptr
<
QOffscreenSurface
>
fallbackSurface
;
42
std
::
unique_ptr
<
QRhi
>
rhi
;
43
};
44
45
q23
::
expected
<
OffscreenGlRhi
,
QString
>
createOffscreenGlRhi
();
46
#
endif
47
48
#
if
QT_CONFIG
(
vulkan
)
49
struct
OffscreenVulkanRhi
50
{
51
// the QRhi must be destroyed before the QVulkanInstance it was built from.
52
std
::
unique_ptr
<
QVulkanInstance
>
vulkanInstance
;
53
std
::
unique_ptr
<
QRhi
>
rhi
;
54
};
55
56
// Requests Vulkan 1.1 (so that callers relying on functionality promoted to core in 1.1, e.g.
57
// vkGetPhysicalDeviceProperties2 or VK_KHR_external_memory, don't need to enable it as an
58
// extension) and any device extensions the caller asks for (e.g. "VK_KHR_external_memory_fd").
59
q23
::
expected
<
OffscreenVulkanRhi
,
QString
>
60
createOffscreenVulkanRhi
(
const
QByteArrayList
&
deviceExtensions
= {});
61
#
endif
62
63
#
if
QT_CONFIG
(
metal
)
64
std
::
unique_ptr
<
QRhi
>
createOffscreenMetalRhi
();
65
#
endif
66
67
#
if
defined
(
Q_OS_WIN
)
68
std
::
unique_ptr
<
QRhi
>
createOffscreenD3D11Rhi
();
69
std
::
unique_ptr
<
QRhi
>
createWarpD3D11Rhi
(
const
QWindowsD3D11TestDeviceContext
&
warpDevice
);
70
std
::
unique_ptr
<
QRhi
>
createD3D12Rhi
();
71
#
endif
72
73
q23
::
expected
<
QByteArray
,
QString
>
readBackPlane
(QRhi &, quint64 handle, QSize planeSize,
74
QRhiTexture
::
Format
);
75
76
#
if
QT_CONFIG
(
opengl
)
77
q23
::
expected
<
QByteArray
,
QString
>
readBackExternalOesTexture
(
QRhi
&,
quint64
handle
,
QSize
size
);
78
#
endif
79
80
}
// namespace QtMultimediaTest
81
82
QT_END_NAMESPACE
83
84
#
endif
// RHI_SUPPORT_P_H
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtMultimediaTest
Definition
framegrabber.cpp:20
QtMultimediaTest::readBackPlane
q23::expected< QByteArray, QString > readBackPlane(QRhi &rhi, quint64 handle, QSize planeSize, QRhiTexture::Format format)
Definition
rhi_support.cpp:112
QtMultimediaTest::createNullRhi
std::unique_ptr< QRhi > createNullRhi()
Definition
rhi_support.cpp:17
qtmultimedia
src
multimediatestlib
rhi_support_p.h
Generated on
for Qt by
1.18.0