From 106c8e15ef04b633bafaa6971b82371bf126ec87 Mon Sep 17 00:00:00 2001 From: Andrew Woloszyn Date: Mon, 4 Jun 2018 10:26:15 -0400 Subject: [PATCH] Don't prime depth by copy. Some drivers don't like this behavior, instead of priming depth by copy, always prime it by rendering. We don't have THAT many depth buffers, and this is likely more reliable. --- gapis/api/vulkan/state_rebuilder.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gapis/api/vulkan/state_rebuilder.go b/gapis/api/vulkan/state_rebuilder.go index 482df1c85f..d0f249e8bd 100644 --- a/gapis/api/vulkan/state_rebuilder.go +++ b/gapis/api/vulkan/state_rebuilder.go @@ -1360,7 +1360,8 @@ func (sb *stateBuilder) createImage(img ImageObjectʳ, imgPrimer *imagePrimer) { attBits := VkImageUsageFlags(VkImageUsageFlagBits_VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VkImageUsageFlagBits_VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) storageBit := VkImageUsageFlags(VkImageUsageFlagBits_VK_IMAGE_USAGE_STORAGE_BIT) - primeByBufCopy := (img.Info().Usage() & transDstBit) != 0 + isDepth := (img.Info().Usage() & VkImageUsageFlags(VkImageUsageFlagBits_VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)) != 0 + primeByBufCopy := (img.Info().Usage()&transDstBit) != 0 && (!isDepth) primeByRendering := (!primeByBufCopy) && ((img.Info().Usage() & attBits) != 0) primeByImageStore := (!primeByBufCopy) && (!primeByRendering) && ((img.Info().Usage() & storageBit) != 0)