Fix possible hangs in ManagedTexture destruction. Change a thread name.

This commit is contained in:
Henrik Rydgård 2024-01-14 23:32:46 +01:00
parent 739f22f721
commit 56c797e7f6
2 changed files with 3 additions and 1 deletions

View file

@ -535,7 +535,7 @@ void VulkanRenderManager::ReleaseCompileQueue() {
}
void VulkanRenderManager::ThreadFunc() {
SetCurrentThreadName("RenderMan");
SetCurrentThreadName("VulkanRenderMan");
while (true) {
_dbg_assert_(useRenderThread_);

View file

@ -35,11 +35,13 @@ public:
ERROR_LOG(IO, "Failed to read file '%s'", filename_.c_str());
filename_.clear();
*state_ = ManagedTexture::LoadState::FAILED;
waitable_->Notify();
return;
}
if (!tempImage_->LoadTextureLevels(buffer, fileSize, type_)) {
*state_ = ManagedTexture::LoadState::FAILED;
waitable_->Notify();
return;
}
delete[] buffer;