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

@ -34,11 +34,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define GL_INDEX_TYPE GL_UNSIGNED_INT
typedef unsigned int glIndex_t;
// everything that is needed by the backend needs
// to be double buffered to allow it to run in
// parallel on a dual cpu machine
#define SMP_FRAMES 2
// 14 bits
// can't be increased without changing bit packing for drawsurfs
// see QSORT_SHADERNUM_SHIFT
@ -573,7 +568,7 @@ typedef struct srfGridMesh_s {
surfaceType_t surfaceType;
// dynamic lighting information
int dlightBits[SMP_FRAMES];
int dlightBits;
// culling information
vec3_t meshBounds[2];
@ -603,7 +598,7 @@ typedef struct {
cplane_t plane;
// dynamic lighting information
int dlightBits[SMP_FRAMES];
int dlightBits;
// triangle definitions (no normals at points)
int numPoints;
@ -619,7 +614,7 @@ typedef struct {
surfaceType_t surfaceType;
// dynamic lighting information
int dlightBits[SMP_FRAMES];
int dlightBits;
// culling information (FIXME: use this!)
vec3_t bounds[2];
@ -891,7 +886,6 @@ typedef struct {
// all state modified by the back end is seperated
// from the front end state
typedef struct {
int smpFrame;
trRefdef_t refdef;
viewParms_t viewParms;
orientationr_t or;
@ -923,8 +917,6 @@ typedef struct {
int viewCount; // incremented every view (twice a scene if portaled)
// and every R_MarkFragments call
int smpFrame; // toggles from 0 to 1 every endFrame
int frameSceneNum; // zeroed at RE_BeginFrame
qboolean worldMapLoaded;
@ -1122,8 +1114,6 @@ extern cvar_t *r_portalOnly;
extern cvar_t *r_subdivisions;
extern cvar_t *r_lodCurveError;
extern cvar_t *r_smp;
extern cvar_t *r_showSmp;
extern cvar_t *r_skipBackEnd;
extern cvar_t *r_stereoEnabled;
@ -1300,11 +1290,6 @@ void GLimp_Init( void );
void GLimp_Shutdown( void );
void GLimp_EndFrame( void );
qboolean GLimp_SpawnRenderThread( void (*function)( void ) );
void *GLimp_RendererSleep( void );
void GLimp_FrontEndSleep( void );
void GLimp_WakeRenderer( void *data );
void GLimp_LogComment( char *comment );
void GLimp_Minimize(void);
@ -1480,7 +1465,7 @@ SCENE GENERATION
============================================================
*/
void R_ToggleSmpFrame( void );
void R_InitNextFrame( void );
void RE_ClearScene( void );
void RE_AddRefEntityToScene( const refEntity_t *ent );
@ -1584,7 +1569,6 @@ RENDERER BACK END FUNCTIONS
=============================================================
*/
void RB_RenderThread( void );
void RB_ExecuteRenderCommands( const void *data );
/*
@ -1698,9 +1682,7 @@ typedef enum {
#define MAX_POLYVERTS 3000
// all of the information needed by the back end must be
// contained in a backEndData_t. This entire structure is
// duplicated so the front and back end can run in parallel
// on an SMP machine
// contained in a backEndData_t
typedef struct {
drawSurf_t drawSurfs[MAX_DRAWSURFS];
dlight_t dlights[MAX_DLIGHTS];
@ -1713,20 +1695,15 @@ typedef struct {
extern int max_polys;
extern int max_polyverts;
extern backEndData_t *backEndData[SMP_FRAMES]; // the second one may not be allocated
extern backEndData_t *backEndData; // the second one may not be allocated
extern volatile renderCommandList_t *renderCommandList;
extern volatile qboolean renderThreadActive;
void *R_GetCommandBuffer( int bytes );
void RB_ExecuteRenderCommands( const void *data );
void R_InitCommandBuffers( void );
void R_ShutdownCommandBuffers( void );
void R_SyncRenderThread( void );
void R_IssuePendingRenderCommands( void );
void R_AddDrawSurfCmd( drawSurf_t *drawSurfs, int numDrawSurfs );