diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-01-07 15:26:53 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-01-12 20:37:20 +0100 |
commit | bfc713530a6354ce786d3f9bd0f4567844e7240f (patch) | |
tree | 5e760c6b936974046802f056c0dae1c71b987863 /tests/auto/gui/rhi | |
parent | 9d15854138b72be25f4584144eee8f4c0bf8117a (diff) |
rhi: Add queries for vertex input/output limits
Mainly because we do have legacy code in the Qt 5 graphical effects that
tries to dynamically determine the max number of varyings. Make it
easier to port such code.
Change-Id: I846cab2c2fe7b4cd473b5ced0146ca36f1c8169b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'tests/auto/gui/rhi')
-rw-r--r-- | tests/auto/gui/rhi/qrhi/tst_qrhi.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index 5c3b2d2ddd..e71e7a9a2f 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -353,6 +353,9 @@ void tst_QRhi::create() const int framesInFlight = rhi->resourceLimit(QRhi::FramesInFlight); const int texArrayMax = rhi->resourceLimit(QRhi::TextureArraySizeMax); const int uniBufRangeMax = rhi->resourceLimit(QRhi::MaxUniformBufferRange); + const int maxVertexInputs = rhi->resourceLimit(QRhi::MaxVertexInputs); + const int maxVertexOutputs = rhi->resourceLimit(QRhi::MaxVertexOutputs); + QVERIFY(texMin >= 1); QVERIFY(texMax >= texMin); QVERIFY(maxAtt >= 1); @@ -360,6 +363,8 @@ void tst_QRhi::create() if (rhi->isFeatureSupported(QRhi::TextureArrays)) QVERIFY(texArrayMax > 1); QVERIFY(uniBufRangeMax >= 224 * 4 * 4); + QVERIFY(maxVertexInputs >= 8); + QVERIFY(maxVertexOutputs >= 8); QVERIFY(rhi->nativeHandles()); |