mirror of
https://github.com/lubosz/overte.git
synced 2025-04-27 20:15:29 +02:00
Fix excessive copying when querying the size of a KTX backed texture
This commit is contained in:
parent
6e6fd608dd
commit
960c29edb7
1 changed files with 3 additions and 4 deletions
|
@ -487,12 +487,11 @@ void Texture::setAutoGenerateMips(bool enable) {
|
|||
}
|
||||
|
||||
Size Texture::getStoredMipSize(uint16 level) const {
|
||||
PixelsPointer mipFace = accessStoredMipFace(level);
|
||||
Size size = 0;
|
||||
if (mipFace && mipFace->getSize()) {
|
||||
for (int face = 0; face < getNumFaces(); face++) {
|
||||
for (int face = 0; face < getNumFaces(); face++) {
|
||||
if (isStoredMipFaceAvailable(level, face)) {
|
||||
size += getStoredMipFaceSize(level, face);
|
||||
}
|
||||
}
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue