diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-08-22 16:22:49 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-08-23 20:49:47 +0200 |
commit | 37bf3b883d428d2fe0cae6513777d0c25c18d4ad (patch) | |
tree | 423258e16fbcb27dbaa31503c24e760cf9143ec2 /src/gui/rhi | |
parent | 6b146566e6686477af99126945df4fd2c059b426 (diff) |
rhi: metal: Update out-of-date internal comments
Would have been nice to provide a flag to set the METAL_DEVICE_WRAPPER_TYPE
env.var. but apparently it needs to be set very early, the QRhi just cannot
do it, it's too late to qputenv then. So just update the internal docs.
Change-Id: I94926debe3af73b67018c5449d7893df38f31f0d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi')
-rw-r--r-- | src/gui/rhi/qrhimetal.mm | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index dc21feb74c..ddf8961fe2 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -33,11 +33,11 @@ QT_BEGIN_NAMESPACE #endif // Note: we expect everything here pass the Metal API validation when running -// in Debug mode in XCode. Some of the issues that break validation are not -// obvious and not visible when running outside XCode. -// -// An exception is the nextDrawable Called Early blah blah warning, which is -// plain and simply false. +// in Debug mode in XCode (or with METAL_DEVICE_WRAPPER_TYPE=1). An exception +// is the nextDrawable Called Early blah blah warning, which is plain and +// simply false. This may not be present with newer XCode. There may also be +// warnings about threading (e.g. about accessing view.layer), those are +// expected for now. /*! \class QRhiMetalInitParams @@ -52,10 +52,13 @@ QT_BEGIN_NAMESPACE rhi = QRhi::create(QRhi::Metal, ¶ms); \endcode - \note Metal API validation cannot be enabled by the application. Instead, - run the debug build of the application in XCode. Generating a - \c{.xcodeproj} file via \c{qmake -spec macx-xcode} provides a convenient - way to enable this. + \note Metal API validation cannot be enabled programmatically by the QRhi. + Instead, either run the debug build of the application in XCode, by + generating a \c{.xcodeproj} file via \c{cmake -G Xcode}, or set the + environment variable \c{METAL_DEVICE_WRAPPER_TYPE=1}. The variable needs to + be set early on in the environment, perferably before starting the process; + attempting to set it at QRhi creation time is not functional in practice. + (too late probably) \note QRhiSwapChain can only target QWindow instances that have their surface type set to QSurface::MetalSurface. |