diff options
author | Eric Anholt <eric@anholt.net> | 2019-06-05 16:08:33 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2019-06-06 15:49:55 -0700 |
commit | 28aae85bdac6e7271f273d6310fc1dc41553f8ec (patch) | |
tree | ea1a64f4727b84423940c89a2c35ddc10e1f55f3 /run.c | |
parent | d30e99c24cca48502257254bb1869dd489ca48bf (diff) |
run: Limit OMP to the -j threads limit.
The -j argument only worked for the "1" case where OMP is skipped.
Otherwise, we'd spawn the max amount of threads (except for -j 1 where
OMP is skipped) and overflow the current_shader_names array.
Noticed when trying to work around an apparent freedreno bug with too
many contexts on the same screen.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'run.c')
-rw-r--r-- | run.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -557,6 +557,7 @@ main(int argc, char **argv) } case 'j': max_threads = atoi(optarg); + omp_set_num_threads(max_threads); break; case 'b': generate_prog_bin = 1; |