diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2023-03-16 15:09:34 +0100 |
---|---|---|
committer | Christian Strømme <christian.stromme@qt.io> | 2023-03-16 19:33:43 +0000 |
commit | dc4432358626eccc9e4f5146e59d9a8f913b0144 (patch) | |
tree | f922c5c5dbbe209206e8ed094bc6ad4b64150dc7 /src/gui/rhi/qrhivulkan.cpp | |
parent | c5d4dde67896611e171db778f2bff23e614b9d14 (diff) |
rhi: Make non-critical pipeline cache warnings qCDebug instead
It's not just that these are not fatal, but some "errors" are
not actual errors, e.g. getting "Nothing to serialize" from Metal
is not something we care about.
Convert them from qWarning to qCDebug with our standard category,
so they still all show up when running with QSG_INFO=1, but won't
pollute the output for regular users. Even if a cache file cannot
be used or written, that's not something typical users care about.
Pick-to: 6.5
Fixes: QTBUG-110485
Change-Id: I63d815f7b95c4d6a4428497b7247811e860ebf04
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhivulkan.cpp')
-rw-r--r-- | src/gui/rhi/qrhivulkan.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp index 1128ea8f64..b2f72dce49 100644 --- a/src/gui/rhi/qrhivulkan.cpp +++ b/src/gui/rhi/qrhivulkan.cpp @@ -4383,7 +4383,7 @@ QByteArray QRhiVulkan::pipelineCacheData() size_t dataSize = 0; VkResult err = df->vkGetPipelineCacheData(dev, pipelineCache, &dataSize, nullptr); if (err != VK_SUCCESS) { - qWarning("Failed to get pipeline cache data size: %d", err); + qCDebug(QRHI_LOG_INFO, "Failed to get pipeline cache data size: %d", err); return QByteArray(); } const size_t headerSize = sizeof(QVkPipelineCacheDataHeader); @@ -4391,7 +4391,7 @@ QByteArray QRhiVulkan::pipelineCacheData() data.resize(dataOffset + dataSize); err = df->vkGetPipelineCacheData(dev, pipelineCache, &dataSize, data.data() + dataOffset); if (err != VK_SUCCESS) { - qWarning("Failed to get pipeline cache data of %d bytes: %d", int(dataSize), err); + qCDebug(QRHI_LOG_INFO, "Failed to get pipeline cache data of %d bytes: %d", int(dataSize), err); return QByteArray(); } @@ -4416,7 +4416,7 @@ void QRhiVulkan::setPipelineCacheData(const QByteArray &data) const size_t headerSize = sizeof(QVkPipelineCacheDataHeader); if (data.size() < qsizetype(headerSize)) { - qWarning("setPipelineCacheData: Invalid blob size"); + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: Invalid blob size"); return; } QVkPipelineCacheDataHeader header; @@ -4424,49 +4424,49 @@ void QRhiVulkan::setPipelineCacheData(const QByteArray &data) const quint32 rhiId = pipelineCacheRhiId(); if (header.rhiId != rhiId) { - qWarning("setPipelineCacheData: The data is for a different QRhi version or backend (%u, %u)", - rhiId, header.rhiId); + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: The data is for a different QRhi version or backend (%u, %u)", + rhiId, header.rhiId); return; } const quint32 arch = quint32(sizeof(void*)); if (header.arch != arch) { - qWarning("setPipelineCacheData: Architecture does not match (%u, %u)", + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: Architecture does not match (%u, %u)", arch, header.arch); return; } if (header.driverVersion != physDevProperties.driverVersion) { - qWarning("setPipelineCacheData: driverVersion does not match (%u, %u)", - physDevProperties.driverVersion, header.driverVersion); + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: driverVersion does not match (%u, %u)", + physDevProperties.driverVersion, header.driverVersion); return; } if (header.vendorId != physDevProperties.vendorID) { - qWarning("setPipelineCacheData: vendorID does not match (%u, %u)", - physDevProperties.vendorID, header.vendorId); + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: vendorID does not match (%u, %u)", + physDevProperties.vendorID, header.vendorId); return; } if (header.deviceId != physDevProperties.deviceID) { - qWarning("setPipelineCacheData: deviceID does not match (%u, %u)", - physDevProperties.deviceID, header.deviceId); + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: deviceID does not match (%u, %u)", + physDevProperties.deviceID, header.deviceId); return; } if (header.uuidSize != VK_UUID_SIZE) { - qWarning("setPipelineCacheData: VK_UUID_SIZE does not match (%u, %u)", - quint32(VK_UUID_SIZE), header.uuidSize); + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: VK_UUID_SIZE does not match (%u, %u)", + quint32(VK_UUID_SIZE), header.uuidSize); return; } if (data.size() < qsizetype(headerSize + VK_UUID_SIZE)) { - qWarning("setPipelineCacheData: Invalid blob, no uuid"); + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: Invalid blob, no uuid"); return; } if (memcmp(data.constData() + headerSize, physDevProperties.pipelineCacheUUID, VK_UUID_SIZE)) { - qWarning("setPipelineCacheData: pipelineCacheUUID does not match"); + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: pipelineCacheUUID does not match"); return; } const size_t dataOffset = headerSize + VK_UUID_SIZE; if (data.size() < qsizetype(dataOffset + header.dataSize)) { - qWarning("setPipelineCacheData: Invalid blob, data missing"); + qCDebug(QRHI_LOG_INFO, "setPipelineCacheData: Invalid blob, data missing"); return; } @@ -4479,7 +4479,7 @@ void QRhiVulkan::setPipelineCacheData(const QByteArray &data) qCDebug(QRHI_LOG_INFO, "Created pipeline cache with initial data of %d bytes", int(header.dataSize)); } else { - qWarning("Failed to create pipeline cache with initial data specified"); + qCDebug(QRHI_LOG_INFO, "Failed to create pipeline cache with initial data specified"); } } |