diff options
author | Grazvydas Ignotas <[email protected]> | 2017-02-26 02:44:07 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-02-27 14:49:46 +0100 |
commit | 7f268cf12b39d1de8ff38cf5beea50298cf841c2 (patch) | |
tree | c9ed73410074b06954d65ecaac6e76187237b33f /src/gallium/auxiliary | |
parent | 993612193575f5f218af52c4ed7525e15083548e (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 <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_queue.c | 2 |
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 c51b6213c8c..8dd4cb3ccbb 100644 --- a/src/gallium/auxiliary/util/u_queue.c +++ b/src/gallium/auxiliary/util/u_queue.c @@ -236,7 +236,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; } } |