Vulkan: Implement StagingTexture2D on top of StagingBuffer

Greatly simplifies things, and we weren't using the linear texture
implementation anyway.
This commit is contained in:
Stenzek
2016-11-19 22:22:04 +10:00
parent 4bc0e14995
commit e241ec6666
5 changed files with 91 additions and 510 deletions

View File

@ -1007,10 +1007,8 @@ bool FramebufferManager::CreateReadbackTextures()
VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT |
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
// We can't copy to/from color<->depth formats, so using a linear texture is not an option here.
// TODO: Investigate if vkCmdBlitImage can be used. The documentation isn't that clear.
m_depth_readback_texture = StagingTexture2DBuffer::Create(STAGING_BUFFER_TYPE_READBACK, EFB_WIDTH,
EFB_HEIGHT, EFB_DEPTH_TEXTURE_FORMAT);
m_depth_readback_texture = StagingTexture2D::Create(STAGING_BUFFER_TYPE_READBACK, EFB_WIDTH,
EFB_HEIGHT, EFB_DEPTH_TEXTURE_FORMAT);
if (!m_depth_copy_texture || !m_depth_readback_texture)
{
ERROR_LOG(VIDEO, "Failed to create EFB depth readback texture");