mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Video Backends: Move and rename HostTextureFormat to AbstractTextureFormat
This commit is contained in:
parent
2cdc93f4ab
commit
e4896d39bd
14 changed files with 54 additions and 55 deletions
|
@ -17,22 +17,22 @@ bool AbstractTexture::Save(const std::string& filename, unsigned int level)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool AbstractTexture::IsCompressedHostTextureFormat(HostTextureFormat format)
|
||||
bool AbstractTexture::IsCompressedHostTextureFormat(AbstractTextureFormat format)
|
||||
{
|
||||
// This will need to be changed if we add any other uncompressed formats.
|
||||
return format != HostTextureFormat::RGBA8;
|
||||
return format != AbstractTextureFormat::RGBA8;
|
||||
}
|
||||
|
||||
size_t AbstractTexture::CalculateHostTextureLevelPitch(HostTextureFormat format, u32 row_length)
|
||||
size_t AbstractTexture::CalculateHostTextureLevelPitch(AbstractTextureFormat format, u32 row_length)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case HostTextureFormat::DXT1:
|
||||
case AbstractTextureFormat::DXT1:
|
||||
return static_cast<size_t>(std::max(1u, row_length / 4)) * 8;
|
||||
case HostTextureFormat::DXT3:
|
||||
case HostTextureFormat::DXT5:
|
||||
case AbstractTextureFormat::DXT3:
|
||||
case AbstractTextureFormat::DXT5:
|
||||
return static_cast<size_t>(std::max(1u, row_length / 4)) * 16;
|
||||
case HostTextureFormat::RGBA8:
|
||||
case AbstractTextureFormat::RGBA8:
|
||||
default:
|
||||
return static_cast<size_t>(row_length) * 4;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue