summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhi_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2022-07-07 11:02:58 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2022-07-07 17:53:23 +0200
commitcd3a6fa41497ba6f3dac123536d22b88c61c17a2 (patch)
tree94774096bd0c5f380d334270deae59f34fbc8fb2 /src/gui/rhi/qrhi_p.h
parent6619c9408778b8607948e46079ddb369f750214f (diff)
rhi: Fix up the instancing step rate type
This is a UINT/uint32_t/GLuint/NSUInteger in all APIs (with Metal being special due to being 64-bit in 64-bit apps whereas all others are 32-bit always, at least on 64-bit Windows) As the stride is already an uint32, follow suit for the step rate. There was no reason to have this as int in the first place. As an added bonus, some casts, that were previously needed when mapping to the underlying API reality, can now be removed. Change-Id: I8e0eef037bd795b637578dfc3e59dc2efaa5976c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi_p.h')
-rw-r--r--src/gui/rhi/qrhi_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h
index 053049eaf8..ea1e6b312d 100644
--- a/src/gui/rhi/qrhi_p.h
+++ b/src/gui/rhi/qrhi_p.h
@@ -131,7 +131,7 @@ public:
};
QRhiVertexInputBinding() = default;
- QRhiVertexInputBinding(quint32 stride, Classification cls = PerVertex, int stepRate = 1);
+ QRhiVertexInputBinding(quint32 stride, Classification cls = PerVertex, quint32 stepRate = 1);
quint32 stride() const { return m_stride; }
void setStride(quint32 s) { m_stride = s; }
@@ -139,13 +139,13 @@ public:
Classification classification() const { return m_classification; }
void setClassification(Classification c) { m_classification = c; }
- int instanceStepRate() const { return m_instanceStepRate; }
- void setInstanceStepRate(int rate) { m_instanceStepRate = rate; }
+ quint32 instanceStepRate() const { return m_instanceStepRate; }
+ void setInstanceStepRate(quint32 rate) { m_instanceStepRate = rate; }
private:
quint32 m_stride = 0;
Classification m_classification = PerVertex;
- int m_instanceStepRate = 1;
+ quint32 m_instanceStepRate = 1;
};
Q_DECLARE_TYPEINFO(QRhiVertexInputBinding, Q_RELOCATABLE_TYPE);