Make sure to unwrap surface everywhere

This commit is contained in:
baldurk
2016-02-07 18:49:00 +01:00
parent 554b942ef6
commit 84345e1728
2 changed files with 9 additions and 9 deletions
+5 -5
View File
@@ -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-
@@ -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(