Skip to content

Commit

Permalink
Fix possible hangs in ManagedTexture destruction. Change a thread name.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jan 15, 2024
1 parent 739f22f commit 56c797e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Common/GPU/Vulkan/VulkanRenderManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ void VulkanRenderManager::ReleaseCompileQueue() {
}

void VulkanRenderManager::ThreadFunc() {
SetCurrentThreadName("RenderMan");
SetCurrentThreadName("VulkanRenderMan");
while (true) {
_dbg_assert_(useRenderThread_);

Expand Down
2 changes: 2 additions & 0 deletions Common/Render/ManagedTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ class TextureLoadTask : public Task {
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;
Expand Down

0 comments on commit 56c797e

Please sign in to comment.