summaryrefslogtreecommitdiff
path: root/src/rend2/tr_backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rend2/tr_backend.c')
-rw-r--r--src/rend2/tr_backend.c45
1 files changed, 4 insertions, 41 deletions
diff --git a/src/rend2/tr_backend.c b/src/rend2/tr_backend.c
index c3d39433..4e6ab2dd 100644
--- a/src/rend2/tr_backend.c
+++ b/src/rend2/tr_backend.c
@@ -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;
@@ -838,7 +838,7 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) {
/*
============================================================================
-RENDER BACK END THREAD FUNCTIONS
+RENDER BACK END FUNCTIONS
============================================================================
*/
@@ -913,7 +913,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();
@@ -1811,9 +1811,6 @@ const void *RB_PostProcess(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 ) {
@@ -1821,12 +1818,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 *));
@@ -1866,7 +1857,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;
@@ -1874,31 +1865,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;
- }
-}
-
-