Fix sporadic crash on vkDestroySwapchainKHR().
MVKSwapchain & MVKSurface init _layerObserver to nil.
This commit is contained in:
parent
ffa9ca1b3c
commit
b773e7aaab
@ -32,6 +32,7 @@ Released TBD
|
|||||||
- Fix zero local threadgroup size in indirect tessellated rendering.
|
- Fix zero local threadgroup size in indirect tessellated rendering.
|
||||||
- Fix crash when clearing attachments using layered rendering on older macOS devices.
|
- Fix crash when clearing attachments using layered rendering on older macOS devices.
|
||||||
- Fixes to Metal renderpass layered rendering settings.
|
- Fixes to Metal renderpass layered rendering settings.
|
||||||
|
- Fix sporadic crash on `vkDestroySwapchainKHR()`.
|
||||||
- `MoltenVKShaderConverter` tool: Add MSL version and platform command-line options.
|
- `MoltenVKShaderConverter` tool: Add MSL version and platform command-line options.
|
||||||
- Allow building external dependency libraries in `Debug` mode.
|
- Allow building external dependency libraries in `Debug` mode.
|
||||||
- Enable AMD and NV GLSL extensions when building `glslang` for `MoltenVKGLSLToSPIRVConverter`.
|
- Enable AMD and NV GLSL extensions when building `glslang` for `MoltenVKGLSLToSPIRVConverter`.
|
||||||
|
@ -45,6 +45,8 @@ MVKSurface::MVKSurface(MVKInstance* mvkInstance,
|
|||||||
obj = ((PLATFORM_VIEW_CLASS*)obj).layer;
|
obj = ((PLATFORM_VIEW_CLASS*)obj).layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_layerObserver = nil;
|
||||||
|
|
||||||
// Confirm that we were provided with a CAMetalLayer
|
// Confirm that we were provided with a CAMetalLayer
|
||||||
if ([obj isKindOfClass: [CAMetalLayer class]]) {
|
if ([obj isKindOfClass: [CAMetalLayer class]]) {
|
||||||
_mtlCAMetalLayer = (CAMetalLayer*)[obj retain]; // retained
|
_mtlCAMetalLayer = (CAMetalLayer*)[obj retain]; // retained
|
||||||
|
@ -179,6 +179,7 @@ id<CAMetalDrawable> MVKSwapchain::getNextCAMetalDrawable() {
|
|||||||
MVKSwapchain::MVKSwapchain(MVKDevice* device,
|
MVKSwapchain::MVKSwapchain(MVKDevice* device,
|
||||||
const VkSwapchainCreateInfoKHR* pCreateInfo) : MVKVulkanAPIDeviceObject(device), _surfaceLost(false) {
|
const VkSwapchainCreateInfoKHR* pCreateInfo) : MVKVulkanAPIDeviceObject(device), _surfaceLost(false) {
|
||||||
_currentAcquisitionID = 0;
|
_currentAcquisitionID = 0;
|
||||||
|
_layerObserver = nil;
|
||||||
|
|
||||||
// If applicable, release any surfaces (not currently being displayed) from the old swapchain.
|
// If applicable, release any surfaces (not currently being displayed) from the old swapchain.
|
||||||
MVKSwapchain* oldSwapchain = (MVKSwapchain*)pCreateInfo->oldSwapchain;
|
MVKSwapchain* oldSwapchain = (MVKSwapchain*)pCreateInfo->oldSwapchain;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user