mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Video Backends: Move and rename HostTextureFormat to AbstractTextureFormat
This commit is contained in:
@ -88,20 +88,20 @@ VkFormat GetLinearFormat(VkFormat format)
|
||||
}
|
||||
}
|
||||
|
||||
VkFormat GetVkFormatForHostTextureFormat(HostTextureFormat format)
|
||||
VkFormat GetVkFormatForHostTextureFormat(AbstractTextureFormat format)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case HostTextureFormat::DXT1:
|
||||
case AbstractTextureFormat::DXT1:
|
||||
return VK_FORMAT_BC1_RGBA_UNORM_BLOCK;
|
||||
|
||||
case HostTextureFormat::DXT3:
|
||||
case AbstractTextureFormat::DXT3:
|
||||
return VK_FORMAT_BC2_UNORM_BLOCK;
|
||||
|
||||
case HostTextureFormat::DXT5:
|
||||
case AbstractTextureFormat::DXT5:
|
||||
return VK_FORMAT_BC3_UNORM_BLOCK;
|
||||
|
||||
case HostTextureFormat::RGBA8:
|
||||
case AbstractTextureFormat::RGBA8:
|
||||
default:
|
||||
return VK_FORMAT_R8G8B8A8_UNORM;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "VideoBackends/Vulkan/Constants.h"
|
||||
#include "VideoBackends/Vulkan/ObjectCache.h"
|
||||
#include "VideoCommon/RenderState.h"
|
||||
#include "VideoCommon/TextureConfig.h"
|
||||
|
||||
namespace Vulkan
|
||||
{
|
||||
@ -27,7 +28,7 @@ u32 MakeRGBA8Color(float r, float g, float b, float a);
|
||||
bool IsDepthFormat(VkFormat format);
|
||||
bool IsCompressedFormat(VkFormat format);
|
||||
VkFormat GetLinearFormat(VkFormat format);
|
||||
VkFormat GetVkFormatForHostTextureFormat(HostTextureFormat format);
|
||||
VkFormat GetVkFormatForHostTextureFormat(AbstractTextureFormat format);
|
||||
u32 GetTexelSize(VkFormat format);
|
||||
u32 GetBlockSize(VkFormat format);
|
||||
|
||||
|
@ -120,7 +120,7 @@ bool VKTexture::Save(const std::string& filename, unsigned int level)
|
||||
// We can't dump compressed textures currently (it would mean drawing them to a RGBA8
|
||||
// framebuffer, and saving that). TextureCache does not call Save for custom textures
|
||||
// anyway, so this is fine for now.
|
||||
_assert_(m_config.format == HostTextureFormat::RGBA8);
|
||||
_assert_(m_config.format == AbstractTextureFormat::RGBA8);
|
||||
|
||||
// Determine dimensions of image we want to save.
|
||||
u32 level_width = std::max(1u, m_config.width >> level);
|
||||
|
Reference in New Issue
Block a user