summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.h
diff options
context:
space:
mode:
authorHenri Beauchamp <sldev@free.fr>2022-11-19 21:42:41 +0100
committerHenri Beauchamp <sldev@free.fr>2022-11-19 21:42:41 +0100
commit9c5043d8c62ae0d321d01560098edf67bf17ebf7 (patch)
tree40c08451a3e110e423a1d7a44dc134b560f23ecc /indra/newview/llviewertexture.h
parent783926e124a96414443dfb9dcb5229e698ef29e7 (diff)
Fix a thread safety issue in the GL image worker.
LLViewerTexture::mNeedsCreateTexture needs to be an attomic bool since it is written both in the main thread and in the GL image worker thread. We can now enable threaded bump maps creation as a result of this fix. I have read the CLA Document and I hereby sign the CLA
Diffstat (limited to 'indra/newview/llviewertexture.h')
-rw-r--r--indra/newview/llviewertexture.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index b953d7006b..2f5e0d01df 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -27,6 +27,7 @@
#ifndef LL_LLVIEWERTEXTURE_H
#define LL_LLVIEWERTEXTURE_H
+#include "llatomic.h"
#include "llgltexture.h"
#include "lltimer.h"
#include "llframetimer.h"
@@ -528,7 +529,9 @@ protected:
LLFrameTimer mStopFetchingTimer; // Time since mDecodePriority == 0.f.
BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!)
- BOOL mNeedsCreateTexture;
+ // This needs to be atomic, since it is written both in the main thread
+ // and in the GL image worker thread... HB
+ LLAtomicBool mNeedsCreateTexture;
BOOL mForSculpt ; //a flag if the texture is used as sculpt data.
BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally.