Reputation: 708
I have a valid Physical Device: m_physicalDevice[0]
.
I am trying to check the supported layers by my physical device:
uint32_t physicalLayerCount;
std::vector<VkLayerProperties> vkDeviceLP;
result = vkEnumerateDeviceLayerProperties(m_physicalDevice[0], &physicalLayerCount, nullptr);
if (physicalLayerCount > 0)
{
vkDeviceLP.resize(physicalLayerCount);
vkEnumerateDeviceLayerProperties(m_physicalDevice[0], &physicalLayerCount, vkDeviceLP.data());
}
I've verified that:
•The physical device is valid
•result
is equal to VK_SUCCESS
The problem here is that physicalLayerCount
is = 0, so the code doesn't run the physicalLayerCount > 0
loop. Is it a hardware problem or is something wrong with my code?
(r9 270X is my GPU)
Upvotes: 1
Views: 81
Reputation: 6797
Device layers are deprecated, you shouldn't normally need to query them. For compatibility reasons, it's best to provide the same list of layers when you create a device that you did when creating the instance.
Apart from that, though, it's normal for there to be no layers of any kind: that's the common case on computers that don't have the Vulkan SDK or something like RenderDoc installed; normally only developers have those.
Upvotes: 1