From 97d41439c4c929f4b6a5148fa3e9eb5037411099 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 1 Aug 2022 19:32:26 +0200 Subject: [PATCH] Disable texture decode thread if shared context are not available (SDL1). --- indra/llrender/llimagegl.cpp | 10 ++++++++++ indra/llwindow/llwindowsdl.cpp | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 2088ab9003..7d6bf4f9ee 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -2434,6 +2434,16 @@ LLImageGLThread::LLImageGLThread(LLWindow* window) mFinished = false; mContext = mWindow->createSharedContext(); + + // If context creating is not supported (SDL1), mark texture thread disabled and exit + if( !mContext ) + { + sEnabled = false; + mFinished = true; + return; + } + // + ThreadPool::start(); } diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 5b5dc56eed..0783b1bab7 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -3024,8 +3024,6 @@ std::vector LLWindowSDL::getDynamicFallbackFontList() return rtns; } -#pragma GCC error "Unimplemented. Either disable threaded texture decoding, implent those methods or switch to SDL2." - void* LLWindowSDL::createSharedContext() { LL_WARNS() << "Not available" << LL_ENDL;