summaryrefslogtreecommitdiff
path: root/src/renderer/tr_backend.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2013-01-24 22:53:08 +0000
committerTim Angus <tim@ngus.net>2013-02-16 21:53:37 +0000
commit980a331cec780fe0b2a860517d02a2566eb7451c (patch)
treea57f0d76da9177fdfbf4af1ffde730084507c682 /src/renderer/tr_backend.c
parentb236ff1748a52589237e3ae7506ef9969cf6ad44 (diff)
Remove the SMP renderer feature
Diffstat (limited to 'src/renderer/tr_backend.c')
-rw-r--r--src/renderer/tr_backend.c44
1 files changed, 4 insertions, 40 deletions
diff --git a/src/renderer/tr_backend.c b/src/renderer/tr_backend.c
index 6b34a813..61495083 100644
--- a/src/renderer/tr_backend.c
+++ b/src/renderer/tr_backend.c
@@ -22,7 +22,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;
@@ -683,7 +683,7 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) {
/*
============================================================================
-RENDER BACK END THREAD FUNCTIONS
+RENDER BACK END FUNCTIONS
============================================================================
*/
@@ -735,7 +735,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();
@@ -1112,9 +1112,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 ) {
@@ -1122,12 +1119,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 *));
@@ -1161,7 +1152,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;
@@ -1169,30 +1160,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;
- }
-}
-