mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Fix failed mip insertions not being handled by TextureCache
This commit is contained in:
parent
bfd1274ed3
commit
7225326bfc
1 changed files with 9 additions and 2 deletions
|
@ -501,12 +501,19 @@ void NetworkTexture::ktxMipRequestFinished() {
|
||||||
if (texture) {
|
if (texture) {
|
||||||
texture->assignStoredMip(_ktxMipLevelRangeInFlight.first,
|
texture->assignStoredMip(_ktxMipLevelRangeInFlight.first,
|
||||||
_ktxMipRequest->getData().size(), reinterpret_cast<uint8_t*>(_ktxMipRequest->getData().data()));
|
_ktxMipRequest->getData().size(), reinterpret_cast<uint8_t*>(_ktxMipRequest->getData().data()));
|
||||||
_lowestKnownPopulatedMip = _textureSource->getGPUTexture()->minAvailableMipLevel();
|
|
||||||
|
if (texture->minAvailableMipLevel() <= _ktxMipLevelRangeInFlight.first) {
|
||||||
|
_lowestKnownPopulatedMip = texture->minAvailableMipLevel();
|
||||||
|
_ktxResourceState = WAITING_FOR_MIP_REQUEST;
|
||||||
|
} else {
|
||||||
|
qWarning(networking) << "Failed to load mip: " << _url << ":" << _ktxMipLevelRangeInFlight.first;
|
||||||
|
_ktxResourceState = FAILED_TO_LOAD;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
_ktxResourceState = WAITING_FOR_MIP_REQUEST;
|
||||||
qWarning(networking) << "Trying to update mips but texture is null";
|
qWarning(networking) << "Trying to update mips but texture is null";
|
||||||
}
|
}
|
||||||
finishedLoading(true);
|
finishedLoading(true);
|
||||||
_ktxResourceState = WAITING_FOR_MIP_REQUEST;
|
|
||||||
} else {
|
} else {
|
||||||
finishedLoading(false);
|
finishedLoading(false);
|
||||||
if (handleFailedRequest(_ktxMipRequest->getResult())) {
|
if (handleFailedRequest(_ktxMipRequest->getResult())) {
|
||||||
|
|
Loading…
Reference in a new issue