Cleanup DataFormat
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user