From: Thomas Debesse Date: Mon, 22 Feb 2021 21:56:53 +0000 (+0100) Subject: Merge commit '93ca259313e7902e89974877f4110fc818e9208b' into garux-merge X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dc24f680c400b2325c649fe48ac1984887a1a966;p=xonotic%2Fnetradiant.git Merge commit '93ca259313e7902e89974877f4110fc818e9208b' into garux-merge --- dc24f680c400b2325c649fe48ac1984887a1a966 diff --cc tools/quake3/q3map2/light.c index 100bed59,d6916367..7d3be10e --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@@ -2119,8 -2113,9 +2119,8 @@@ int LightMain( int argc, char **argv ) const char *value; int lightmapMergeSize = 0; qboolean lightSamplesInsist = qfalse; - qboolean fastAllocate = qfalse; + qboolean fastAllocate = qtrue; - /* note it */ Sys_Printf( "--- Light ---\n" ); Sys_Printf( "--- ProcessGameSpecific ---\n" ); @@@ -2689,11 -2683,15 +2689,16 @@@ Sys_Printf( "Faster mode enabled\n" ); } -// else if ( !strcmp( argv[ i ], "-fastallocate" ) ) { -// fastAllocate = qtrue; -// Sys_Printf( "Fast allocation mode enabled\n" ); -// } + else if ( !strcmp( argv[ i ], "-fastallocate" ) ) { + fastAllocate = qtrue; + Sys_Printf( "Fast allocation mode enabled\n" ); + } + + else if ( !strcmp( argv[ i ], "-slowallocate" ) ) { + fastAllocate = qfalse; + Sys_Printf( "Slow allocation mode enabled\n" ); + } + else if ( !strcmp( argv[ i ], "-fastgrid" ) ) { fastgrid = qtrue; Sys_Printf( "Fast grid lighting enabled\n" ); diff --cc tools/quake3/q3map2/lightmaps_ydnar.c index ea36b921,c1c9ced0..6d61b8d7 --- a/tools/quake3/q3map2/lightmaps_ydnar.c +++ b/tools/quake3/q3map2/lightmaps_ydnar.c @@@ -2530,8 -2537,10 +2538,10 @@@ void StoreSurfaceLightmaps( qboolean fa ----------------------------------------------------------------- */ /* note it */ - Sys_Printf( "Subsampling..." ); + Sys_FPrintf( SYS_VRB, "Subsampling..." ); + timer_start = I_FloatTime(); + /* walk the list of raw lightmaps */ numUsed = 0; numTwins = 0; @@@ -2866,6 -2875,8 +2876,8 @@@ } } - Sys_Printf( "%d.", (int) ( I_FloatTime() - timer_start ) ); ++ Sys_FPrintf( SYS_VRB, "%d.", (int) ( I_FloatTime() - timer_start ) ); + /* ----------------------------------------------------------------- convert modelspace deluxemaps to tangentspace ----------------------------------------------------------------- */ @@@ -2944,6 -2957,8 +2958,8 @@@ } } } + - Sys_Printf( "%d.", (int) ( I_FloatTime() - timer_start ) ); ++ Sys_FPrintf( SYS_VRB, "%d.", (int) ( I_FloatTime() - timer_start ) ); } } @@@ -2998,8 -3013,10 +3014,10 @@@ if ( noCollapse == qfalse && deluxemap == qfalse ) { /* note it */ - Sys_Printf( "collapsing..." ); + Sys_FPrintf( SYS_VRB, "collapsing..." ); + timer_start = I_FloatTime(); + /* set all twin refs to null */ for ( i = 0; i < numRawLightmaps; i++ ) { @@@ -3060,6 -3077,8 +3078,8 @@@ } } } + - Sys_Printf( "%d.", (int) ( I_FloatTime() - timer_start ) ); ++ Sys_FPrintf( SYS_VRB, "%d.", (int) ( I_FloatTime() - timer_start ) ); } /* ----------------------------------------------------------------- @@@ -3067,8 -3086,10 +3087,10 @@@ ----------------------------------------------------------------- */ /* note it */ - Sys_Printf( "sorting..." ); + Sys_FPrintf( SYS_VRB, "sorting..." ); + timer_start = I_FloatTime(); + /* allocate a new sorted list */ if ( sortLightmaps == NULL ) { sortLightmaps = safe_malloc( numRawLightmaps * sizeof( int ) ); @@@ -3079,13 -3100,17 +3101,17 @@@ sortLightmaps[ i ] = i; qsort( sortLightmaps, numRawLightmaps, sizeof( int ), CompareRawLightmap ); - Sys_Printf( "%d.", (int) ( I_FloatTime() - timer_start ) ); ++ Sys_FPrintf( SYS_VRB, "%d.", (int) ( I_FloatTime() - timer_start ) ); + /* ----------------------------------------------------------------- allocate output lightmaps ----------------------------------------------------------------- */ /* note it */ - Sys_Printf( "allocating..." ); + Sys_FPrintf( SYS_VRB, "allocating..." ); + timer_start = I_FloatTime(); + /* kill all existing output lightmaps */ if ( outLightmaps != NULL ) { for ( i = 0; i < numOutLightmaps; i++ ) @@@ -3132,13 -3157,17 +3158,17 @@@ } } - Sys_Printf( "%d.", (int) ( I_FloatTime() - timer_start ) ); ++ Sys_FPrintf( SYS_VRB, "%d.", (int) ( I_FloatTime() - timer_start ) ); + /* ----------------------------------------------------------------- store output lightmaps ----------------------------------------------------------------- */ /* note it */ - Sys_Printf( "storing..." ); + Sys_FPrintf( SYS_VRB, "storing..." ); + timer_start = I_FloatTime(); + /* count the bsp lightmaps and allocate space */ if ( bspLightBytes != NULL ) { free( bspLightBytes ); @@@ -3223,13 -3252,17 +3253,17 @@@ remove( filename ); } - Sys_Printf( "%d.", (int) ( I_FloatTime() - timer_start ) ); ++ Sys_FPrintf( SYS_VRB, "%d.", (int) ( I_FloatTime() - timer_start ) ); + /* ----------------------------------------------------------------- project the lightmaps onto the bsp surfaces ----------------------------------------------------------------- */ /* note it */ - Sys_Printf( "projecting..." ); + Sys_FPrintf( SYS_VRB, "projecting..." ); + timer_start = I_FloatTime(); + /* walk the list of surfaces */ for ( i = 0; i < numBSPDrawSurfaces; i++ ) { @@@ -3506,8 -3539,10 +3540,10 @@@ } } - Sys_Printf( "%d.", (int) ( I_FloatTime() - timer_start ) ); ++ Sys_FPrintf( SYS_VRB, "%d.", (int) ( I_FloatTime() - timer_start ) ); + /* finish */ - Sys_Printf( "done.\n" ); + Sys_FPrintf( SYS_VRB, "done.\n" ); /* calc num stored */ numStored = numBSPLightBytes / 3;