hot-fix: proper calculation of image samples num

This commit is contained in:
psucien 2024-10-23 23:11:01 +02:00
parent 6e00121eb5
commit a8d2684929
3 changed files with 14 additions and 1 deletions

View file

@ -261,6 +261,13 @@ struct Image {
return last_level + 1;
}
u32 NumSamples() const {
if (GetType() == ImageType::Color2DMsaa || GetType() == ImageType::Color2DMsaaArray) {
return 1u << last_level;
}
return 1;
}
ImageType GetType() const noexcept {
return static_cast<ImageType>(type);
}