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>
This commit is contained in:
parent
6b146566e6
commit
37bf3b883d
@ -33,11 +33,11 @@ QT_BEGIN_NAMESPACE
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Note: we expect everything here pass the Metal API validation when running
|
// 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
|
// in Debug mode in XCode (or with METAL_DEVICE_WRAPPER_TYPE=1). An exception
|
||||||
// obvious and not visible when running outside XCode.
|
// 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
|
||||||
// An exception is the nextDrawable Called Early blah blah warning, which is
|
// warnings about threading (e.g. about accessing view.layer), those are
|
||||||
// plain and simply false.
|
// expected for now.
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QRhiMetalInitParams
|
\class QRhiMetalInitParams
|
||||||
@ -52,10 +52,13 @@ QT_BEGIN_NAMESPACE
|
|||||||
rhi = QRhi::create(QRhi::Metal, ¶ms);
|
rhi = QRhi::create(QRhi::Metal, ¶ms);
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\note Metal API validation cannot be enabled by the application. Instead,
|
\note Metal API validation cannot be enabled programmatically by the QRhi.
|
||||||
run the debug build of the application in XCode. Generating a
|
Instead, either run the debug build of the application in XCode, by
|
||||||
\c{.xcodeproj} file via \c{qmake -spec macx-xcode} provides a convenient
|
generating a \c{.xcodeproj} file via \c{cmake -G Xcode}, or set the
|
||||||
way to enable this.
|
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
|
\note QRhiSwapChain can only target QWindow instances that have their
|
||||||
surface type set to QSurface::MetalSurface.
|
surface type set to QSurface::MetalSurface.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user