Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/render/intern/source/render_texture.c')
-rw-r--r--source/blender/render/intern/source/render_texture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 513cfa6df7d..b4a14f5337d 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -3653,7 +3653,8 @@ void render_realtime_texture(ShadeInput *shi, Image *ima)
if (firsttime) {
BLI_lock_thread(LOCK_IMAGE);
if (firsttime) {
- for (a=0; a<BLENDER_MAX_THREADS; a++) {
+ const int num_threads = BLI_system_thread_count();
+ for (a = 0; a < num_threads; a++) {
memset(&imatex[a], 0, sizeof(Tex));
BKE_texture_default(&imatex[a]);
imatex[a].type= TEX_IMAGE;