vtdec/vulkan: use Shared storage mode for IOSurface textures

Fixes a debug assertion with i(Pad)OS 14:

'IOSurface textures must use MTLStorageModeShared'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1592>
This commit is contained in:
Matthew Waters 2020-09-23 20:08:46 +10:00 committed by GStreamer Merge Bot
parent 5a1b56a0e0
commit 6c26d0e1a0

View file

@ -251,7 +251,7 @@ gst_new_mtl_tex_descripter_from_memory (GstIOSurfaceVulkanMemory * memory)
tex_desc.sampleCount = mvkSampleCountFromVkSampleCountFlagBits(vk_mem->create_info.samples);
tex_desc.arrayLength = vk_mem->create_info.arrayLayers;
tex_desc.usage = MTLTextureUsageShaderRead | MTLTextureUsagePixelFormatView;//mvkMTLTextureUsageFromVkImageUsageFlags(vk_mem->create_info.usage);
tex_desc.storageMode = MTLStorageModePrivate;//MTLStorageModeManaged; /* IOSurface == shared/managed */
tex_desc.storageMode = MTLStorageModeShared;
tex_desc.cpuCacheMode = MTLCPUCacheModeDefaultCache;//mvkMTLCPUCacheModeFromVkMemoryPropertyFlags(vk_mem->vk_mem->properties);
return tex_desc;