Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions engine/render/r_texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,16 @@ void r_tex_c::LoadFile()

auto raw = std::make_unique<image_c>();
raw->CopyRaw(IMGTYPE_GRAY, 8, 8, t_defaultTexture);
if (flags & TF_ASYNC) {
// Missing/failed file on an async worker thread: the GL context
// belongs to the main thread, so route the placeholder upload
// through the pending-upload queue like the success path above.
img = std::move(raw);
flags = TF_NOMIPMAP;
status = PENDING_UPLOAD;
manager->EnqueueTextureUpload(this);
return;
}
Upload(*raw, TF_NOMIPMAP);
status = DONE;
}
Expand Down