summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhimetal.mm
diff options
context:
space:
mode:
authorInho Lee <inho.lee@qt.io>2020-05-14 15:32:07 +0200
committerInho Lee <inho.lee@qt.io>2020-05-27 11:54:56 +0200
commit2503a59e353e5714b184b499e10969aed9f80465 (patch)
treef2d582226ea16045796aa159773cc2d75455e2a8 /src/gui/rhi/qrhimetal.mm
parent524d78160726b25ed424a2c7a6d5e423b7ea4b93 (diff)
QRhiVertexInputAttribute : Add unsigned int formats for vertex input
Task-number: QTBUG-83173 Change-Id: I640cd1fe74227d2cc96672d6c7aaac93e1930bcd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhimetal.mm')
-rw-r--r--src/gui/rhi/qrhimetal.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm
index 33fe389892..a003d4815d 100644
--- a/src/gui/rhi/qrhimetal.mm
+++ b/src/gui/rhi/qrhimetal.mm
@@ -566,6 +566,8 @@ bool QRhiMetal::isFeatureSupported(QRhi::Feature feature) const
return true;
case QRhi::RenderToNonBaseMipLevel:
return true;
+ case QRhi::UIntAttributes:
+ return true;
default:
Q_UNREACHABLE();
return false;
@@ -3099,6 +3101,14 @@ static inline MTLVertexFormat toMetalAttributeFormat(QRhiVertexInputAttribute::F
return MTLVertexFormatUCharNormalized;
else
Q_UNREACHABLE();
+ case QRhiVertexInputAttribute::UInt4:
+ return MTLVertexFormatUInt4;
+ case QRhiVertexInputAttribute::UInt3:
+ return MTLVertexFormatUInt3;
+ case QRhiVertexInputAttribute::UInt2:
+ return MTLVertexFormatUInt2;
+ case QRhiVertexInputAttribute::UInt:
+ return MTLVertexFormatUInt;
default:
Q_UNREACHABLE();
return MTLVertexFormatFloat4;