From 84345e1728c59b0da8726635ce39fa38a69046d5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 11 Dec 2015 16:58:14 +0100 Subject: [PATCH] Make sure to unwrap surface everywhere --- renderdoc/driver/vulkan/vk_replay.cpp | 10 +++++----- renderdoc/driver/vulkan/wrappers/vk_wsi_funcs.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_replay.cpp b/renderdoc/driver/vulkan/vk_replay.cpp index ddc4e71d3..dd6e64115 100644 --- a/renderdoc/driver/vulkan/vk_replay.cpp +++ b/renderdoc/driver/vulkan/vk_replay.cpp @@ -241,7 +241,7 @@ void VulkanReplay::OutputWindow::Create(WrappedVulkan *driver, VkDevice device, VkSurfaceCapabilitiesKHR capabilities; - ObjDisp(inst)->GetPhysicalDeviceSurfaceCapabilitiesKHR(Unwrap(phys), surface, &capabilities); + ObjDisp(inst)->GetPhysicalDeviceSurfaceCapabilitiesKHR(Unwrap(phys), Unwrap(surface), &capabilities); RDCASSERT(capabilities.supportedUsageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT); RDCASSERT(capabilities.supportedUsageFlags & VK_IMAGE_USAGE_TRANSFER_DST_BIT); @@ -252,14 +252,14 @@ void VulkanReplay::OutputWindow::Create(WrappedVulkan *driver, VkDevice device, { uint32_t numFormats = 0; - vkr = ObjDisp(inst)->GetPhysicalDeviceSurfaceFormatsKHR(Unwrap(phys), surface, &numFormats, NULL); + vkr = ObjDisp(inst)->GetPhysicalDeviceSurfaceFormatsKHR(Unwrap(phys), Unwrap(surface), &numFormats, NULL); RDCASSERT(vkr == VK_SUCCESS); if(numFormats > 0) { VkSurfaceFormatKHR *formats = new VkSurfaceFormatKHR[numFormats]; - vkr = ObjDisp(inst)->GetPhysicalDeviceSurfaceFormatsKHR(Unwrap(phys), surface, &numFormats, formats); + vkr = ObjDisp(inst)->GetPhysicalDeviceSurfaceFormatsKHR(Unwrap(phys), Unwrap(surface), &numFormats, formats); RDCASSERT(vkr == VK_SUCCESS); if(numFormats == 1 && formats[0].format == VK_FORMAT_UNDEFINED) @@ -297,14 +297,14 @@ void VulkanReplay::OutputWindow::Create(WrappedVulkan *driver, VkDevice device, uint32_t numModes = 0; - vkr = ObjDisp(inst)->GetPhysicalDeviceSurfacePresentModesKHR(Unwrap(phys), surface, &numModes, NULL); + vkr = ObjDisp(inst)->GetPhysicalDeviceSurfacePresentModesKHR(Unwrap(phys), Unwrap(surface), &numModes, NULL); RDCASSERT(vkr == VK_SUCCESS); if(numModes > 0) { VkPresentModeKHR *modes = new VkPresentModeKHR[numModes]; - vkr = ObjDisp(inst)->GetPhysicalDeviceSurfacePresentModesKHR(Unwrap(phys), surface, &numModes, modes); + vkr = ObjDisp(inst)->GetPhysicalDeviceSurfacePresentModesKHR(Unwrap(phys), Unwrap(surface), &numModes, modes); RDCASSERT(vkr == VK_SUCCESS); // If mailbox mode is available, use it, as is the lowest-latency non- diff --git a/renderdoc/driver/vulkan/wrappers/vk_wsi_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_wsi_funcs.cpp index 2b7424d55..634423a46 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_wsi_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_wsi_funcs.cpp @@ -34,7 +34,7 @@ VkResult WrappedVulkan::vkGetPhysicalDeviceSurfaceSupportKHR( VkSurfaceKHR surface, VkBool32* pSupported) { - return ObjDisp(physicalDevice)->GetPhysicalDeviceSurfaceSupportKHR(Unwrap(physicalDevice), queueFamilyIndex, surface, pSupported); + return ObjDisp(physicalDevice)->GetPhysicalDeviceSurfaceSupportKHR(Unwrap(physicalDevice), queueFamilyIndex, Unwrap(surface), pSupported); } VkResult WrappedVulkan::vkGetPhysicalDeviceSurfaceCapabilitiesKHR( @@ -42,7 +42,7 @@ VkResult WrappedVulkan::vkGetPhysicalDeviceSurfaceCapabilitiesKHR( VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { - return ObjDisp(physicalDevice)->GetPhysicalDeviceSurfaceCapabilitiesKHR(Unwrap(physicalDevice), surface, pSurfaceCapabilities); + return ObjDisp(physicalDevice)->GetPhysicalDeviceSurfaceCapabilitiesKHR(Unwrap(physicalDevice), Unwrap(surface), pSurfaceCapabilities); } VkResult WrappedVulkan::vkGetPhysicalDeviceSurfaceFormatsKHR( @@ -51,7 +51,7 @@ VkResult WrappedVulkan::vkGetPhysicalDeviceSurfaceFormatsKHR( uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats) { - return ObjDisp(physicalDevice)->GetPhysicalDeviceSurfaceFormatsKHR(Unwrap(physicalDevice), surface, pSurfaceFormatCount, pSurfaceFormats); + return ObjDisp(physicalDevice)->GetPhysicalDeviceSurfaceFormatsKHR(Unwrap(physicalDevice), Unwrap(surface), pSurfaceFormatCount, pSurfaceFormats); } VkResult WrappedVulkan::vkGetPhysicalDeviceSurfacePresentModesKHR( @@ -60,7 +60,7 @@ VkResult WrappedVulkan::vkGetPhysicalDeviceSurfacePresentModesKHR( uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { - return ObjDisp(physicalDevice)->GetPhysicalDeviceSurfacePresentModesKHR(Unwrap(physicalDevice), surface, pPresentModeCount, pPresentModes); + return ObjDisp(physicalDevice)->GetPhysicalDeviceSurfacePresentModesKHR(Unwrap(physicalDevice), Unwrap(surface), pPresentModeCount, pPresentModes); } bool WrappedVulkan::Serialise_vkGetSwapchainImagesKHR(