Cleanup DataFormat

This commit is contained in:
Georg Hagen
2025-01-11 01:21:08 +01:00
parent 0eda1964e3
commit 6a3c31346f
2 changed files with 9 additions and 9 deletions

View File

@@ -225,7 +225,7 @@ namespace OpenVulkano
return { UNDEFINED };
}
uint32_t DataFormat::GetBytesPerPixel()
uint32_t DataFormat::GetBytesPerPixel() const
{
auto size = FORMAT_SIZE_MAP.find(m_format);
if (size == FORMAT_SIZE_MAP.end() || size->second == 0) [[unlikely]]
@@ -236,7 +236,7 @@ namespace OpenVulkano
return size->second;
}
bool DataFormat::IsBlockCompressed()
bool DataFormat::IsBlockCompressed() const
{
for (auto format: magic_enum::enum_values<DataFormat::Format>())
{
@@ -249,7 +249,7 @@ namespace OpenVulkano
return false;
}
size_t DataFormat::CalculatedSize(uint32_t& width, uint32_t& height)
size_t DataFormat::CalculatedSize(uint32_t& width, uint32_t& height) const
{
if (IsBlockCompressed())
{