summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhimetal_p_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-08-13 18:13:43 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2021-08-18 22:15:35 +0200
commit213755a86622ae8b3ed3d7ad34a6aecd051b2b03 (patch)
tree45fd3c206fa63713a3c607894bc2c3eca011c482 /src/gui/rhi/qrhimetal_p_p.h
parenta52b24ac39648b343555de7aff83ffa234958529 (diff)
rhi: metal: Make base vertex and instance support optional
Like we do for OpenGL. Conveniently enough the QRhi feature flags are readily available. This should prevent errors such as: MTLValidateFeatureSupport:3901: failed assertion `Base Vertex Instance Drawing is not supported on this device' on the iOS Simulator. It is not clear since which version or SDK this became a fatal problem, but the base vertex/instance support is indeed an optional feature according to the Metal Feature set tables, so not calling the drawIndexedPrimitives variant taking baseVertex and baseInstance when the reported iOS GPU family is too low is the right thing to do regardless. Pick-to: 6.2 6.1 Fixes: QTBUG-95795 Change-Id: I47c54a77a66a0410b86b8d4e5a1863dc730490f4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhimetal_p_p.h')
-rw-r--r--src/gui/rhi/qrhimetal_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhimetal_p_p.h b/src/gui/rhi/qrhimetal_p_p.h
index 3a22b76b22..eed9afc9f1 100644
--- a/src/gui/rhi/qrhimetal_p_p.h
+++ b/src/gui/rhi/qrhimetal_p_p.h
@@ -476,6 +476,7 @@ public:
struct {
int maxTextureSize = 4096;
+ bool baseVertexAndInstance = true;
} caps;
QRhiMetalData *d = nullptr;