From bfc713530a6354ce786d3f9bd0f4567844e7240f Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 7 Jan 2022 15:26:53 +0100 Subject: rhi: Add queries for vertex input/output limits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Christian Strømme --- src/gui/rhi/qrhimetal.mm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/rhi/qrhimetal.mm') diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index e825f56943..b52117c15c 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -654,6 +654,10 @@ int QRhiMetal::resourceLimit(QRhi::ResourceLimit limit) const return 2048; case QRhi::MaxUniformBufferRange: return 65536; + case QRhi::MaxVertexInputs: + return 31; + case QRhi::MaxVertexOutputs: + return 15; // use the minimum from MTLGPUFamily1/2/3 default: Q_UNREACHABLE(); return 0; -- cgit v1.2.3