KhronosGroup/MoltenVK

Design question: Review linear image usage and feature reporting?

Open

#1.515 aberto em 27 de jan. de 2022

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Objective-C++ (514 forks)github user discovery
Help wantedQuestion

Métricas do repositório

Stars
 (5.666 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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

Guia do colaborador