diff options
author | Inho Lee <inho.lee@qt.io> | 2020-09-16 14:38:58 +0200 |
---|---|---|
committer | Inho Lee <inho.lee@qt.io> | 2020-09-21 11:36:14 +0200 |
commit | 2a7d6e2779bf0c7915396a8af0e1048d254debc3 (patch) | |
tree | a0f02b0039d9c437432152c22e593c4a6f816779 /src/gui/rhi/qrhimetal.mm | |
parent | 0148c6925ec3b6b9a9d2f57ae44fea292a6625e1 (diff) |
Support signed integer attributes on QRHI
Previous UIntAttributes feature is renamed as IntAttributes.
Change-Id: I4b4a87a0eebf37291da832605f7bee8fb2d4e62b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhimetal.mm')
-rw-r--r-- | src/gui/rhi/qrhimetal.mm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index 2736377c78..a770c72a99 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -562,7 +562,7 @@ bool QRhiMetal::isFeatureSupported(QRhi::Feature feature) const return true; case QRhi::RenderToNonBaseMipLevel: return true; - case QRhi::UIntAttributes: + case QRhi::IntAttributes: return true; case QRhi::ScreenSpaceDerivatives: return true; @@ -3090,6 +3090,14 @@ static inline MTLVertexFormat toMetalAttributeFormat(QRhiVertexInputAttribute::F return MTLVertexFormatUInt2; case QRhiVertexInputAttribute::UInt: return MTLVertexFormatUInt; + case QRhiVertexInputAttribute::SInt4: + return MTLVertexFormatInt4; + case QRhiVertexInputAttribute::SInt3: + return MTLVertexFormatInt3; + case QRhiVertexInputAttribute::SInt2: + return MTLVertexFormatInt2; + case QRhiVertexInputAttribute::SInt: + return MTLVertexFormatInt; default: Q_UNREACHABLE(); return MTLVertexFormatFloat4; |