Common/Vulkan: Remove unused methods in staging texture

This commit is contained in:
Connor McLaughlin 2020-10-21 23:13:34 +10:00
parent b6a8da34fe
commit bf46461dd6
4 changed files with 6 additions and 20 deletions

View file

@ -37,6 +37,7 @@ public:
ALWAYS_INLINE VkDeviceSize GetMapOffset() const { return m_map_offset; }
ALWAYS_INLINE VkDeviceSize GetMapSize() const { return m_map_size; }
ALWAYS_INLINE bool IsValid() const { return (m_buffer != VK_NULL_HANDLE); }
ALWAYS_INLINE bool IsCoherent() const { return m_coherent; }
bool Map(VkDeviceSize offset = 0, VkDeviceSize size = VK_WHOLE_SIZE);
void Unmap();

View file

@ -169,16 +169,6 @@ void StagingTexture::CopyToTexture(u32 src_x, u32 src_y, Texture& dst_texture, u
m_flush_fence_counter = g_vulkan_context->GetCurrentFenceCounter();
}
bool StagingTexture::Map()
{
return m_staging_buffer.Map();
}
void StagingTexture::Unmap()
{
return m_staging_buffer.Unmap();
}
void StagingTexture::Flush()
{
if (!m_needs_flush)

View file

@ -45,16 +45,6 @@ public:
void CopyToTexture(u32 src_x, u32 src_y, Texture& dst_texture, u32 dst_x, u32 dst_y, u32 dst_layer, u32 dst_level,
u32 width, u32 height);
// Maps the texture into the CPU address space, enabling it to read the contents.
// The Map call may not perform synchronization. If the contents of the staging texture
// has been updated by a CopyFromTexture call, you must call Flush() first.
// If persistent mapping is supported in the backend, this may be a no-op.
bool Map();
// Unmaps the CPU-readable copy of the texture. May be a no-op on backends which
// support persistent-mapped buffers.
void Unmap();
// Flushes pending writes from the CPU to the GPU, and reads from the GPU to the CPU.
// This may cause a command buffer flush depending on if one has occurred between the last
// call to CopyFromTexture()/CopyToTexture() and the Flush() call.

View file

@ -9,6 +9,7 @@
#include "../string_util.h"
#include "context.h"
#include "shader_compiler.h"
Log_SetChannel(Vulkan::Util);
namespace Vulkan {
namespace Util {
@ -80,6 +81,10 @@ u32 GetTexelSize(VkFormat format)
case VK_FORMAT_B8G8R8A8_UNORM:
return 4;
case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
return 2;
case VK_FORMAT_BC1_RGBA_UNORM_BLOCK:
return 8;