HarmonyOS 鸿蒙Next Maleoon910,Vulkan, 3D贴图的压缩格式支持
HarmonyOS 鸿蒙Next Maleoon910,Vulkan, 3D贴图的压缩格式支持
我使用Mate60pro(kirin 9000s,Maleoon 910)进行vulkan开发,发现其不支持ASTC和ETC2格式的3D贴图。这是我的测试代码
VkFormat Qformat[7] = { VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_ASTC_6x6_UNORM_BLOCK, VK_FORMAT_ASTC_6x6_SRGB_BLOCK, VK_FORMAT_ASTC_4x4_UNORM_BLOCK, VK_FORMAT_ASTC_4x4_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK }; // 图像格式
VkImageType QimageType[2] = { VK_IMAGE_TYPE_3D, VK_IMAGE_TYPE_2D }; // 图像类型
VkImageTiling Qtiling = VK_IMAGE_TILING_OPTIMAL; // tiling 模式
VkImageUsageFlags Qusage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT;
for (int i = 0; i < 2; i++)
{
for (int f = 0; f < 7; f++)
{
VkImageFormatProperties imageFormatProperties;
VkResult result = vkGetPhysicalDeviceImageFormatProperties(vkPhysicalDevice, Qformat[f], QimageType[i], Qtiling, Qusage, 0, &imageFormatProperties);
if (result == VK_SUCCESS) {
// ...
}
else {
// ...
}
}
}
请问这个特性在硬件层面是否不支持吗?如果支持的话vulkan层面应该怎么做?如果不支持的话,有什么推荐的替代方法吗,以及大概多久能支持?