Merge pull request #1520 from billhollings/simulator-gpu-counter-sets

Fix use of GPU counter sets on older versions of iOS running on the simulator.
This commit is contained in:
Bill Hollings 2022-02-05 13:23:26 -05:00 committed by GitHub
commit 24c2315072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1639,10 +1639,10 @@ void MVKPhysicalDevice::initMetalFeatures() {
checkSupportsMTLCounterSamplingPoint(Stage, PIPELINE_STAGE);
#endif
#if !MVK_APPLE_SILICON
#if MVK_MACOS
// On macOS, if we couldn't query supported sample points (on macOS 11),
// but the platform can support immediate-mode sample points, indicate that here.
if (!_metalFeatures.counterSamplingPoints && mvkOSVersionIsAtLeast(10.15)) { \
if (!_metalFeatures.counterSamplingPoints && mvkOSVersionIsAtLeast(10.15) && !supportsMTLGPUFamily(Apple1)) { \
_metalFeatures.counterSamplingPoints = MVK_COUNTER_SAMPLING_AT_DRAW | MVK_COUNTER_SAMPLING_AT_DISPATCH | MVK_COUNTER_SAMPLING_AT_BLIT; \
}
#endif