Merge pull request #1910 from billhollings/fix-ts-qp
Do not fail on request for timestamp query pool that is too large.
This commit is contained in:
commit
6111aabc8f
@ -26,6 +26,7 @@ Released TBD
|
|||||||
- Fix memory leak when waiting on timeline semaphores.
|
- Fix memory leak when waiting on timeline semaphores.
|
||||||
- Fix race condition when updating values in `VkPastPresentationTimingGOOGLE`,
|
- Fix race condition when updating values in `VkPastPresentationTimingGOOGLE`,
|
||||||
and ensure swapchain image presented time is always populated when requested.
|
and ensure swapchain image presented time is always populated when requested.
|
||||||
|
- Report error, but do not fail on request for timestamp query pool that is too large for `MTLCounterSampleBuffer`.
|
||||||
- Ensure shaders that use `PhysicalStorageBufferAddresses` encode the use of the associated `MTLBuffer`.
|
- Ensure shaders that use `PhysicalStorageBufferAddresses` encode the use of the associated `MTLBuffer`.
|
||||||
- Disable pipeline cache compression prior to macOS 10.15 and iOS/tvOS 13.0.
|
- Disable pipeline cache compression prior to macOS 10.15 and iOS/tvOS 13.0.
|
||||||
- Add `MVK_ENABLE_EXPLICIT_LOD_WORKAROUND` environment variable to selectively
|
- Add `MVK_ENABLE_EXPLICIT_LOD_WORKAROUND` environment variable to selectively
|
||||||
|
@ -316,7 +316,9 @@ MVKOcclusionQueryPool::MVKOcclusionQueryPool(MVKDevice* device,
|
|||||||
VkDeviceSize newBuffLen = min(reqBuffLen, maxBuffLen);
|
VkDeviceSize newBuffLen = min(reqBuffLen, maxBuffLen);
|
||||||
|
|
||||||
if (reqBuffLen > maxBuffLen) {
|
if (reqBuffLen > maxBuffLen) {
|
||||||
reportError(VK_ERROR_OUT_OF_DEVICE_MEMORY, "vkCreateQueryPool(): Each query pool can support a maximum of %d queries.", uint32_t(newBuffLen / kMVKQuerySlotSizeInBytes));
|
reportError(VK_ERROR_OUT_OF_DEVICE_MEMORY,
|
||||||
|
"vkCreateQueryPool(): Each occlusion query pool can support a maximum of %d queries.",
|
||||||
|
uint32_t(newBuffLen / kMVKQuerySlotSizeInBytes));
|
||||||
}
|
}
|
||||||
|
|
||||||
NSUInteger mtlBuffLen = mvkAlignByteCount(newBuffLen, _device->_pMetalFeatures->mtlBufferAlignment);
|
NSUInteger mtlBuffLen = mvkAlignByteCount(newBuffLen, _device->_pMetalFeatures->mtlBufferAlignment);
|
||||||
@ -356,9 +358,9 @@ void MVKGPUCounterQueryPool::initMTLCounterSampleBuffer(const VkQueryPoolCreateI
|
|||||||
NSError* err = nil;
|
NSError* err = nil;
|
||||||
_mtlCounterBuffer = [getMTLDevice() newCounterSampleBufferWithDescriptor: tsDesc error: &err];
|
_mtlCounterBuffer = [getMTLDevice() newCounterSampleBufferWithDescriptor: tsDesc error: &err];
|
||||||
if (err) {
|
if (err) {
|
||||||
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED,
|
reportError(VK_ERROR_OUT_OF_DEVICE_MEMORY,
|
||||||
"Could not create MTLCounterSampleBuffer for query pool of type %s. Reverting to emulated behavior. (Error code %li): %s",
|
"Could not create MTLCounterSampleBuffer of size %llu, for %d queries, in query pool of type %s. Reverting to emulated behavior. (Error code %li): %s",
|
||||||
queryTypeName, (long)err.code, err.localizedDescription.UTF8String));
|
(VkDeviceSize)pCreateInfo->queryCount * kMVKQuerySlotSizeInBytes, pCreateInfo->queryCount, queryTypeName, (long)err.code, err.localizedDescription.UTF8String);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user