Remove the SMP renderer feature

This commit is contained in:
Tim Angus 2013-01-24 22:53:08 +00:00
parent 3f489fe5f2
commit 51df89ab13
35 changed files with 160 additions and 839 deletions

View file

@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "tr_local.h"
backEndData_t *backEndData[SMP_FRAMES];
backEndData_t *backEndData;
backEndState_t backEnd;
@ -682,7 +682,7 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) {
/*
============================================================================
RENDER BACK END THREAD FUNCTIONS
RENDER BACK END FUNCTIONS
============================================================================
*/
@ -734,7 +734,7 @@ void RE_StretchRaw (int x, int y, int w, int h, int cols, int rows, const byte *
if ( !tr.registered ) {
return;
}
R_SyncRenderThread();
R_IssuePendingRenderCommands();
// we definately want to sync every frame for the cinematics
qglFinish();
@ -1111,9 +1111,6 @@ const void *RB_SwapBuffers( const void *data ) {
/*
====================
RB_ExecuteRenderCommands
This function will be called synchronously if running without
smp extensions, or asynchronously by another thread.
====================
*/
void RB_ExecuteRenderCommands( const void *data ) {
@ -1121,12 +1118,6 @@ void RB_ExecuteRenderCommands( const void *data ) {
t1 = ri.Milliseconds ();
if ( !r_smp->integer || data == backEndData[0]->commands.cmds ) {
backEnd.smpFrame = 0;
} else {
backEnd.smpFrame = 1;
}
while ( 1 ) {
data = PADP(data, sizeof(void *));
@ -1160,7 +1151,7 @@ void RB_ExecuteRenderCommands( const void *data ) {
break;
case RC_END_OF_LIST:
default:
// stop rendering on this thread
// stop rendering
t2 = ri.Milliseconds ();
backEnd.pc.msec = t2 - t1;
return;
@ -1168,30 +1159,3 @@ void RB_ExecuteRenderCommands( const void *data ) {
}
}
/*
================
RB_RenderThread
================
*/
void RB_RenderThread( void ) {
const void *data;
// wait for either a rendering command or a quit command
while ( 1 ) {
// sleep until we have work to do
data = GLimp_RendererSleep();
if ( !data ) {
return; // all done, renderer is shutting down
}
renderThreadActive = qtrue;
RB_ExecuteRenderCommands( data );
renderThreadActive = qfalse;
}
}