diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 2dafdd69..7a7a0fc2 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -1610,9 +1610,10 @@ namespace dxvk { void DxvkContext::initImage( const Rc& image, - const VkImageSubresourceRange& subresources) { + const VkImageSubresourceRange& subresources, + VkImageLayout initialLayout) { m_execBarriers.accessImage(image, subresources, - VK_IMAGE_LAYOUT_UNDEFINED, 0, 0, + initialLayout, 0, 0, image->info().layout, image->info().stages, image->info().access); diff --git a/src/dxvk/dxvk_context.h b/src/dxvk/dxvk_context.h index 9299a6f9..0ab86361 100644 --- a/src/dxvk/dxvk_context.h +++ b/src/dxvk/dxvk_context.h @@ -627,10 +627,12 @@ namespace dxvk { * while discarding any previous contents. * \param [in] image The image to initialize * \param [in] subresources Image subresources + * \param [in] initialLayout Initial image layout */ void initImage( const Rc& image, - const VkImageSubresourceRange& subresources); + const VkImageSubresourceRange& subresources, + VkImageLayout initialLayout); /** * \brief Invalidates a buffer's contents