Merge pull request #2008 from danginsburg/issue_2006_2
Fix crash in Dota 2 on macOS < 10.15 - closes #2006
This commit is contained in:
commit
473ea0c2f1
@ -1573,6 +1573,7 @@ VkResult MVKPhysicalDevice::getQueueFamilyProperties(uint32_t* pCount,
|
|||||||
void MVKPhysicalDevice::updateTimestampsAndPeriod() {
|
void MVKPhysicalDevice::updateTimestampsAndPeriod() {
|
||||||
if (_properties.vendorID == kAppleVendorId) { return; }
|
if (_properties.vendorID == kAppleVendorId) { return; }
|
||||||
|
|
||||||
|
if ([_mtlDevice respondsToSelector: @selector(sampleTimestamps:gpuTimestamp:)]) {
|
||||||
MTLTimestamp earlierCPUTs = _prevCPUTimestamp;
|
MTLTimestamp earlierCPUTs = _prevCPUTimestamp;
|
||||||
MTLTimestamp earlierGPUTs = _prevGPUTimestamp;
|
MTLTimestamp earlierGPUTs = _prevGPUTimestamp;
|
||||||
[_mtlDevice sampleTimestamps: &_prevCPUTimestamp gpuTimestamp: &_prevGPUTimestamp];
|
[_mtlDevice sampleTimestamps: &_prevCPUTimestamp gpuTimestamp: &_prevGPUTimestamp];
|
||||||
@ -1587,6 +1588,7 @@ void MVKPhysicalDevice::updateTimestampsAndPeriod() {
|
|||||||
_properties.limits.timestampPeriod = ((1.0 - a) * _properties.limits.timestampPeriod) + (a * tsPeriod);
|
_properties.limits.timestampPeriod = ((1.0 - a) * _properties.limits.timestampPeriod) + (a * tsPeriod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma mark Memory models
|
#pragma mark Memory models
|
||||||
|
Loading…
x
Reference in New Issue
Block a user