Enumerate device extensions on CreateDevice for debug logging

* Also works around a temporary loader bug
This commit is contained in:
baldurk
2016-01-14 19:43:50 +01:00
parent b86389d3ca
commit 7466b53e4b
2 changed files with 18 additions and 2 deletions
@@ -68,6 +68,9 @@ void InitInstanceReplayTables(VkInstance instance)
RDCASSERT(table);
// we know we'll only have one instance, so this is safe
InstanceGPA(EnumerateDeviceExtensionProperties)
InstanceGPA(EnumerateDeviceLayerProperties)
InstanceGPA(GetPhysicalDeviceSurfaceCapabilitiesKHR)
InstanceGPA(GetPhysicalDeviceSurfaceFormatsKHR)
@@ -559,6 +559,21 @@ bool WrappedVulkan::Serialise_vkCreateDevice(
else
RDCWARN("vertexPipelineStoresAndAtomics = false, output mesh data will not be available");
uint32_t numExts = 0;
VkResult vkr = ObjDisp(physicalDevice)->EnumerateDeviceExtensionProperties(Unwrap(physicalDevice), NULL, &numExts, NULL);
RDCASSERT(vkr == VK_SUCCESS);
VkExtensionProperties *exts = new VkExtensionProperties[numExts];
vkr = ObjDisp(physicalDevice)->EnumerateDeviceExtensionProperties(Unwrap(physicalDevice), NULL, &numExts, exts);
RDCASSERT(vkr == VK_SUCCESS);
for(uint32_t i=0; i < numExts; i++)
RDCLOG("Ext %u: %s (%u)", i, exts[i].extensionName, exts[i].specVersion);
SAFE_DELETE_ARRAY(exts);
// PORTABILITY check that extensions and layers supported in capture (from createInfo) are supported in replay
VkResult ret = GetDeviceDispatchTable(NULL)->CreateDevice(Unwrap(physicalDevice), &createInfo, NULL, &device);
@@ -575,8 +590,6 @@ bool WrappedVulkan::Serialise_vkCreateDevice(
m_QueueFamilyIdx = qFamilyIdx;
VkResult vkr = VK_SUCCESS;
if(m_InternalCmds.cmdpool == VK_NULL_HANDLE)
{
VkCommandPoolCreateInfo poolInfo = { VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, NULL, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, qFamilyIdx };