Skip to content

Commit

Permalink
Copy depth aspect by rendering in overdraw
Browse files Browse the repository at this point in the history
Specifically do this for the store end (i.e. new depth/stencil image to
old image), so that we don't have to add TRANSFER_DST to all depth
images.
  • Loading branch information
sean-purcell committed Jul 23, 2018
1 parent 05d9111 commit 232d4a0
Show file tree
Hide file tree
Showing 5 changed files with 327 additions and 152 deletions.
15 changes: 5 additions & 10 deletions gapii/cc/vulkan_extras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,16 +741,11 @@ uint32_t VulkanSpy::SpyOverride_vkCreateBuffer(
uint32_t VulkanSpy::SpyOverride_vkCreateImage(
VkDevice device, const VkImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkImage* pImage) {
if (is_suspended() || is_observing()) {
VkImageCreateInfo override_create_info = *pCreateInfo;
override_create_info.musage |=
VkImageUsageFlagBits::VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
return mImports.mVkDeviceFunctions[device].vkCreateImage(
device, &override_create_info, pAllocator, pImage);
} else {
return mImports.mVkDeviceFunctions[device].vkCreateImage(
device, pCreateInfo, pAllocator, pImage);
}
VkImageCreateInfo override_create_info = *pCreateInfo;
override_create_info.musage |=
VkImageUsageFlagBits::VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
return mImports.mVkDeviceFunctions[device].vkCreateImage(
device, &override_create_info, pAllocator, pImage);
}

uint32_t VulkanSpy::SpyOverride_vkCreateSwapchainKHR(
Expand Down
Loading

0 comments on commit 232d4a0

Please sign in to comment.