mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 02:42:46 +01:00
fix(render): texture streaming by default with Vulkan only, the streamer after a fallback, failed banks tried again
After review of #555: - gfx.textures.streaming is on by default with the Vulkan renderer only, the one it was measured with; with OpenGL it stays off as before. A value set in eu07.ini is kept for either renderer. A Vulkan renderer falling back to OpenGL as it starts goes without it. The default turned on is logged, as the settings are logged before the renderer is chosen. - The geometry streamer stopped by the shutdown of a Vulkan renderer that failed to start resumes for the OpenGL renderer made after it (geometry_streamer::resume()); before, every streamed model stayed undrawn for the session. - A bank whose load failed is tried again: 5 s after the first failure, twice as long after each one that follows, up to 5 min, by the streamer as it's drawn and by load_now(). Only the first failure in a row is logged. A transient read error no longer leaves the model undrawn till a restart.
This commit is contained in:
@@ -120,7 +120,9 @@ geometry_streamer::hand_over_one( result &Result ) {
|
||||
return; // loaded meanwhile by the thread which read it
|
||||
}
|
||||
++m_failed;
|
||||
ErrorLog( std::format( "Bad model: the geometry of \"{}\" can't be loaded: {}", bank.source()->name(), Result.error ), logtype::model );
|
||||
if( bank.failures() == 1 ) {
|
||||
ErrorLog( std::format( "Bad model: the geometry of \"{}\" can't be loaded: {}", bank.source()->name(), Result.error ), logtype::model );
|
||||
}
|
||||
return;
|
||||
}
|
||||
if( false == bank.adopt( Result.data, Result.epoch ) ) {
|
||||
@@ -312,6 +314,13 @@ geometry_streamer::stop() {
|
||||
m_resident.clear();
|
||||
}
|
||||
|
||||
void
|
||||
geometry_streamer::resume() {
|
||||
|
||||
std::scoped_lock lock { m_mutex };
|
||||
m_stopped = false;
|
||||
}
|
||||
|
||||
geometry_streamer::statistics
|
||||
geometry_streamer::stats() const {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user