Vulkan function vkCreateDevice() returns error VK_ERROR_FEATURE_NOT_PRESENT (VkResult:-8) on HUAWEI P30


I have few Vulkan games run well on numbers of Android devices. However, when I test them on HUAWEI P30 (not P30 Pro) with Mali-G76 MP10 GPU and Android 9.0, function vkCreateDevice() returns error VK_ERROR_FEATURE_NOT_PRESENT (VkResult:-8).

My app should have successfully loaded Vulkan dynamic lib since vkInstance has been created before creating vkDevice.

So what is the reason that vkCreateDevice() return VK_ERROR_FEATURE_NOT_PRESENT? Here is my code snippet:

// Create Logical Device, ensure that this device is connecte to graphics queue

// Step 1 - Retrive the queue family that supports graphics pipeline
uint32_t graphicQueueFamilyIndex;
int i = 0;
for (const auto& family : _queueFamilyProps)
// Check if the family has queues and that are Graphical and not Computational queues.
if (family.queueCount > 0 && family.queueFlags & VK_QUEUE_GRAPHICS_BIT)
graphicQueueFamilyIndex = i; //Found the family, record its index

// Step 2 - Get physical device features
vkGetPhysicalDeviceFeatures(vkPhyDevice, &deviceFeatures);
VkPhysicalDeviceFeatures enabledFeatures = {VK_FALSE};
enabledFeatures.samplerAnisotropy = deviceFeatures.samplerAnisotropy;
enabledFeatures.shaderSampledImageArrayDynamicIndexing = deviceFeatures.shaderSampledImageArrayDynamicIndexing;
enabledFeatures.depthClamp = VK_TRUE;
enabledFeatures.sampleRateShading = VK_TRUE;
enabledFeatures.wideLines = VK_TRUE; //MoltenVK (via Metal API) does not support line width

// Step 3 - Create the logical device
float queuePriorities[1] = { 0.0f };
VkDeviceQueueCreateInfo queueCreateInfo
nullptr, //pNext
0, //flags
graphicQueueFamilyIndex, //queueFamilyIndex
1, //queueCount
queuePriorities //pQueuePriorities
std::vector<const char *> extensionNames { VK_KHR_SWAPCHAIN_EXTENSION_NAME };
VkDeviceCreateInfo deviceInfo
nullptr, //pNext
0, //flags
1, //queueCreateInfoCount
&queueCreateInfo, //pQueueCreateInfos
0, //enabledLayerCount
nullptr, //ppEnabledLayerNames
(uint32_t)extensionNames.size(), //enabledExtensionCount, //ppEnabledExtensionNames
&enabledFeatures //pEnabledFeatures
VK_ASSERT(vkCreateDevice(vkPhyDevice, &deviceInfo, nullptr, &vkDevice
Parents Reply Children
No data
More questions in this forum
There are no posts to show. This could be because there are no posts in this forum or due to a filter.