diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-24 16:34:53 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-29 10:17:25 +0200 |
commit | 9c39dd56283c74d28254c0b01f2edddb66919c08 (patch) | |
tree | 6427f5e5abe4747b4ab7f164d8a182a5ef634c38 /src/quick/items/qquickgraphicsdevice_p.h | |
parent | a2c0fc9e87d84aee77b45705a092f86e4cd96ad8 (diff) |
Make it possible to specify an adapter or physical device only
As required by OpenXR.
While we are at it, make the API a bit more type safe.
Change-Id: I3c6152feeb71359056830ab02d35f8cb258722c0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/items/qquickgraphicsdevice_p.h')
-rw-r--r-- | src/quick/items/qquickgraphicsdevice_p.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/quick/items/qquickgraphicsdevice_p.h b/src/quick/items/qquickgraphicsdevice_p.h index 0a206725a6..e4be39b3e5 100644 --- a/src/quick/items/qquickgraphicsdevice_p.h +++ b/src/quick/items/qquickgraphicsdevice_p.h @@ -68,14 +68,22 @@ public: enum class Type { Null, OpenGLContext, + Adapter, DeviceAndContext, DeviceAndCommandQueue, + PhysicalDevice, DeviceObjects }; QAtomicInt ref; Type type = Type::Null; + struct Adapter { + quint32 luidLow; + qint32 luidHigh; + int featureLevel; + }; + struct DeviceAndContext { void *device; void *context; @@ -86,16 +94,23 @@ public: void *cmdQueue; }; + struct PhysicalDevice { + void *physicalDevice; + }; + struct DeviceObjects { void *physicalDevice; void *device; int queueFamilyIndex; + int queueIndex; }; union { QOpenGLContext *context; + Adapter adapter; DeviceAndContext deviceAndContext; DeviceAndCommandQueue deviceAndCommandQueue; + PhysicalDevice physicalDevice; DeviceObjects deviceObjects; } u; }; |