Validate mesh subset and level of detail ranges


A subset's count and offset, and those of its levels of detail, go
straight to drawIndexed() or draw(), and nothing checked them against
the buffer they index. A file could ask for four billion indices out of
a nine index buffer and the only thing between that and the driver was
the driver. Require every range to fit.

The component types get the same treatment: getSizeOfType() is
Q_UNREACHABLE outside its enumeration, so a value of zero or twelve was
undefined behaviour in a release build and a qFatal in a developer one.

Pick-to: 6.12 6.11 6.8
Change-Id: I166f2bc0c56496e29f5a9502be598dc4bcbb91e0
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
commit9d97aec447ac437143e970d57acf64866cad772f
parentf2a8ca8e91b8cafc5840fd83199bb06f9e8eaf2a
authorAndy Nichols <andy.nichols@qt.io>
committerAndy Nichols <andy.nichols@qt.io>
commit timeFri, 4 Sep 2026 07:53:15 +0000