Merge pull request #1067 from billhollings/setmtltex

vkSetMTLTextureMVK() Fix crash if incoming MTLTexture does not have an IOSurface.
This commit is contained in:
Bill Hollings 2020-09-23 15:34:01 -04:00 committed by GitHub
commit 92336c597a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;