Design question: Review linear image usage and feature reporting?
#1515 aperta il 27 gen 2022
Metriche repository
- Star
- (5666 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Linear images on Metal do not always map very well to Vulkan. In particular, Metal textures on macOS prior to macOS 10.15.6 cannot use Shared storage, and technically the Metal documentation still forbids the use of Shared storage on macOS.
In addition, further restrictions appear under Mac Catalyst and the Simulator.
Should we be taking a stricter approach to limiting the use of Linear image features?
For example, if Shared memory is not not available for textures on a platform, should we be reporting only VK_FORMAT_FEATURE_TRANSFER_SRC_BIT and VK_FORMAT_FEATURE_TRANSFER_DST_BIT in linearTilingFeatures, and only permitting VK_IMAGE_USAGE_TRANSFER_SRC_BIT and VK_IMAGE_USAGE_TRANSFER_DST_BIT usage in vkGetPhysicalDeviceImageFormatProperties(), and then actually implementing such a VkImage as an underlying MTLBuffer?
Doing so is Vulkan-compatible, but might be overly restrictive to common application use cases, where an app plays well when a linear image is created using Managed memory on macOS.
@cdavis5e