diff options
author | Andreas Fänger <[email protected]> | 2011-08-10 08:07:29 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-08-11 08:33:59 -0600 |
commit | e411cd7b0a54d2f9b9f4cda4918aa7742ed5c2a6 (patch) | |
tree | b1d4f68c4a49d4ff7cc36fc03680120c57eb934e /src/mesa/tnl/t_pipeline.c | |
parent | fa351bd2e0aecccd5ed6ef8744d5ba4a6dbf5d2c (diff) |
swrast: initial multi-threaded span rendering
Optional parallel rendering of spans using OpenMP.
Initial implementation for aa triangles. A new option for scons is
also provided to activate the openmp support (off by default).
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/tnl/t_pipeline.c')
-rw-r--r-- | src/mesa/tnl/t_pipeline.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c index 18f095f0d4b..881d5d5f535 100644 --- a/src/mesa/tnl/t_pipeline.c +++ b/src/mesa/tnl/t_pipeline.c @@ -146,7 +146,17 @@ void _tnl_run_pipeline( struct gl_context *ctx ) _tnl_notify_pipeline_output_change( ctx ); } +#ifndef _OPENMP + /* Don't adjust FPU precision mode in case multiple threads are to be used. + * This would require that the additional threads also changed the FPU mode + * which is quite a mess as this had to be done in all parallelized sections; + * otherwise the master thread and all other threads are running in different + * modes, producing inconsistent results. + * Note that all x64 implementations don't define/use START_FAST_MATH, so + * this is "hack" is only used in i386 mode + */ START_FAST_MATH(__tmp); +#endif for (i = 0; i < tnl->pipeline.nr_stages ; i++) { struct tnl_pipeline_stage *s = &tnl->pipeline.stages[i]; @@ -154,7 +164,9 @@ void _tnl_run_pipeline( struct gl_context *ctx ) break; } +#ifndef _OPENMP END_FAST_MATH(__tmp); +#endif } |