Merge pull request #769 from billhollings/master

Fix severe FPS degradation caused by certain swapchain recreation situations.
This commit is contained in:
Bill Hollings 2019-10-30 14:21:05 -04:00 committed by GitHub
commit 1ddacdc25d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -40,6 +40,7 @@ Released 2019/10/29
- Allow `MVK_CONFIG_SYNCHRONOUS_QUEUE_SUBMITS` build setting to be overridden.
- Fix memory leaks of system classes during `VkInstance` and `VkQueue` creation.
- Fix memory leaks when compiling shaders and pipelines without default OS autorelease pool.
- Fix severe FPS degradation caused by certain swapchain recreation situations.
- Log format substitution error when `MTLPixelFormatDepth24Unorm_Stencil8` is not supported.
- Reduce memory usage by adjusting default memory allocs for many `MVKVectorInline` uses and
replacing use of `MVKVectorDefault` with `std::vector` in descriptor set bindings.

View File

@ -446,6 +446,8 @@ public:
const VkImageCreateInfo* pCreateInfo,
MVKSwapchain* swapchain);
~MVKSwapchainImage() override;
protected:
id<MTLTexture> newMTLTexture() override;
id<CAMetalDrawable> getCAMetalDrawable();

View File

@ -1348,4 +1348,7 @@ MVKSwapchainImage::MVKSwapchainImage(MVKDevice* device,
_swapchainIndex = uint32_t(-1);
}
MVKSwapchainImage::~MVKSwapchainImage() {
resetMetalSurface(); // remove drawable from swapchain
}