egl: Add debug option to print all EGLConfigs
QT_QPA_EGLFS_DEBUG=1 prints the attributes for the chosen EGLContext. Make QT_QPA_EGLFS_DEBUG=2 print the same for all EGLContexts. Change-Id: Id161d04789fbd015e29e5a5a89a0901000096ea3 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit d8c771c53acb58cc79cadbb795d59d5e8db7754e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
27337fe242
commit
9fc6a9099e
@ -194,6 +194,21 @@ QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatform
|
||||
if (printConfig) {
|
||||
qDebug() << "Created context for format" << format << "with config:";
|
||||
q_printEglConfig(m_eglDisplay, m_eglConfig);
|
||||
|
||||
static const bool printAllConfigs = qEnvironmentVariableIntValue("QT_QPA_EGLFS_DEBUG") > 1;
|
||||
if (printAllConfigs) {
|
||||
EGLint numConfigs = 0;
|
||||
eglGetConfigs(m_eglDisplay, nullptr, 0, &numConfigs);
|
||||
QVector<EGLConfig> configs;
|
||||
configs.resize(numConfigs);
|
||||
eglGetConfigs(m_eglDisplay, configs.data(), numConfigs, &numConfigs);
|
||||
qDebug("\nAll EGLConfigs: count=%d", numConfigs);
|
||||
for (EGLint i = 0; i < numConfigs; ++i) {
|
||||
qDebug("EGLConfig #%d", i);
|
||||
q_printEglConfig(m_eglDisplay, configs[i]);
|
||||
}
|
||||
qDebug("\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Cannot just call updateFormatFromGL() since it relies on virtuals. Defer it to initialize().
|
||||
|
Loading…
x
Reference in New Issue
Block a user