vkSetMTLTextureMVK() Fix crash if incoming MTLTexture does not have an IOSurface.

This commit is contained in:
Bill Hollings 2020-09-23 13:06:25 -04:00
parent 37fb85f1d7
commit 4097089f1c
2 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@ Released 2020/09/28
frameworks into a single `MoltenVKShaderConverter` framework.
- Fix Metal validation error when occlusion query and renderpass are in separate
Vulkan command buffers.
- `vkSetMTLTextureMVK()` Fix crash if incoming `MTLTexture` does not have an associated `IOSurface`.

View File

@ -698,7 +698,7 @@ VkResult MVKImage::setMTLTexture(uint8_t planeIndex, id<MTLTexture> mtlTexture)
if (_device->_pMetalFeatures->ioSurfaces) {
_ioSurface = mtlTexture.iosurface;
CFRetain(_ioSurface);
if (_ioSurface) { CFRetain(_ioSurface); }
}
return VK_SUCCESS;