From 7d721797fef797fea44fdf2102c21c16c3c8d03f Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 19 Jan 2018 01:36:22 +0100 Subject: [PATCH] [dxvk] To not attempt to clear compressed image The current code violates the rules for vkCmdClearImage if the destination image is compressed. --- src/dxvk/dxvk_context.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index c467c9011..0534408f2 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -182,6 +182,13 @@ namespace dxvk { const VkImageSubresourceRange& subresources) { this->renderPassEnd(); + const DxvkFormatInfo* formatInfo = imageFormatInfo(image->info().format); + + if (formatInfo->flags.test(DxvkFormatFlag::BlockCompressed)) { + Logger::err("DxvkContext: Compressed clears not supported"); + return; + } + if (image->info().layout != VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) { m_barriers.accessImage(image, subresources, VK_IMAGE_LAYOUT_UNDEFINED, 0, 0,