summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrazvydas Ignotas <notasas@gmail.com>2017-02-26 02:44:07 +0200
committerEmil Velikov <emil.l.velikov@gmail.com>2017-03-15 18:02:31 +0000
commitd348151c9990f7558efc2b0d6ae42e2673bbef6d (patch)
tree60cab481ad3ed08cc2401a553d365b0e1482d8a8
parentce5770728a6c16c4190c070f9d97a33447a301d9 (diff)
gallium/u_queue: set num_threads correctly if not all threads start
If i-th thread could not be created it means we have i threads, not i+1, because we start from 0. Fixes: 404d0d5 "gallium/u_queue: add an option to have multiple worker threads" Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit 7f268cf12b39d1de8ff38cf5beea50298cf841c2)
-rw-r--r--src/gallium/auxiliary/util/u_queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_queue.c b/src/gallium/auxiliary/util/u_queue.c
index d0b137826d1..643c92b28b6 100644
--- a/src/gallium/auxiliary/util/u_queue.c
+++ b/src/gallium/auxiliary/util/u_queue.c
@@ -215,7 +215,7 @@ util_queue_init(struct util_queue *queue,
goto fail;
} else {
/* at least one thread created, so use it */
- queue->num_threads = i+1;
+ queue->num_threads = i;
break;
}
}