Skip to content

Commit ab37573

Browse files
committed
tr_init: report OpenMP support in /gfxinfo
1 parent 378203a commit ab37573

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/engine/renderer/tr_init.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
// tr_init.c -- functions that are not called every frame
2424
#include "tr_local.h"
2525
#include "framework/CvarSystem.h"
26+
#include "framework/OmpSystem.h"
2627
#include "DetectGLVendors.h"
2728
#include "Material.h"
2829
#include "GeometryCache.h"
@@ -1059,6 +1060,21 @@ ScreenshotCmd screenshotPNGRegistration("screenshotPNG", ssFormat_t::SSF_PNG, "p
10591060
Log::Notice("Using dual processor acceleration." );
10601061
}
10611062

1063+
#if defined(_OPENMP)
1064+
int ompThreads = Omp::GetThreads();
1065+
1066+
if ( ompThreads == 1 )
1067+
{
1068+
Log::Notice("%sNot using OpenMP parallelism: only one thread.", Color::ToString( Color::Yellow ) );
1069+
}
1070+
else
1071+
{
1072+
Log::Notice("%sUsing OpenMP parallelism with %d threads.", Color::ToString( Color::Green ), ompThreads );
1073+
}
1074+
#else
1075+
Log::Notice("%sNot using OpenMP parallelism: unavailable.", Color::ToString( Color::Yellow ) );
1076+
#endif
1077+
10621078
if ( r_finish->integer )
10631079
{
10641080
Log::Notice("Forcing glFinish." );

0 commit comments

Comments
 (0)