mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-19 08:18:05 +02:00
Merge pull request #11571 from huffman/fix/ktx-thrashing
Fix KTX requests thrashing if a mip level can't be assigned
This commit is contained in:
commit
b1812c30c9
1 changed files with 6 additions and 0 deletions
|
@ -620,6 +620,12 @@ void NetworkTexture::ktxMipRequestFinished() {
|
|||
|
||||
texture->assignStoredMip(mipLevel, data.size(), reinterpret_cast<const uint8_t*>(data.data()));
|
||||
|
||||
// If mip level assigned above is still unavailable, then we assume future requests will also fail.
|
||||
auto minMipLevel = texture->minAvailableMipLevel();
|
||||
if (minMipLevel > mipLevel) {
|
||||
return;
|
||||
}
|
||||
|
||||
QMetaObject::invokeMethod(resource.data(), "setImage",
|
||||
Q_ARG(gpu::TexturePointer, texture),
|
||||
Q_ARG(int, texture->getWidth()),
|
||||
|
|
Loading…
Reference in a new issue