-----------------------------------------------------------------------------------
| 3620 | } |
| 3621 | //----------------------------------------------------------------------------------- |
| 3622 | void TextureGpuManager::_waitFor( TextureGpu *texture, bool metadataOnly ) |
| 3623 | { |
| 3624 | bool bDone = false; |
| 3625 | while( !bDone ) |
| 3626 | { |
| 3627 | bool workerThreadDone = _update( true ); |
| 3628 | bDone = workerThreadDone && mDownloadToRamQueue.empty() && mScheduledTasks.empty(); |
| 3629 | if( !bDone ) |
| 3630 | { |
| 3631 | if( texture->getPendingResidencyChanges() == 0u ) |
| 3632 | { |
| 3633 | if( texture->isDataReady() ) |
| 3634 | bDone = true; |
| 3635 | else if( metadataOnly && texture->isMetadataReady() ) |
| 3636 | bDone = true; |
| 3637 | } |
| 3638 | |
| 3639 | if( !bDone ) |
| 3640 | { |
| 3641 | mVaoManager->_update(); |
| 3642 | if( !workerThreadDone ) |
| 3643 | mRequestToMainThreadEvent.wait(); |
| 3644 | else |
| 3645 | Threads::Sleep( 1 ); |
| 3646 | } |
| 3647 | } |
| 3648 | } |
| 3649 | } |
| 3650 | //----------------------------------------------------------------------------------- |
| 3651 | void TextureGpuManager::_waitForPendingGpuToCpuSyncs( TextureGpu *texture ) |
| 3652 | { |
no test coverage detected