diff options
Diffstat (limited to 'src/rend2/tr_local.h')
-rw-r--r-- | src/rend2/tr_local.h | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/src/rend2/tr_local.h b/src/rend2/tr_local.h index 6730f5c1..4b46f612 100644 --- a/src/rend2/tr_local.h +++ b/src/rend2/tr_local.h @@ -40,11 +40,6 @@ typedef unsigned int glIndex_t; #define BUFFER_OFFSET(i) ((char *)NULL + (i)) -// 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 @@ -1138,8 +1133,8 @@ typedef struct srfGridMesh_s surfaceType_t surfaceType; // dynamic lighting information - int dlightBits[SMP_FRAMES]; - int pshadowBits[SMP_FRAMES]; + int dlightBits; + int pshadowBits; // culling information vec3_t meshBounds[2]; @@ -1182,8 +1177,8 @@ typedef struct surfaceType_t surfaceType; // dynamic lighting information - int dlightBits[SMP_FRAMES]; - int pshadowBits[SMP_FRAMES]; + int dlightBits; + int pshadowBits; // culling information cplane_t plane; @@ -1214,8 +1209,8 @@ typedef struct surfaceType_t surfaceType; // dynamic lighting information - int dlightBits[SMP_FRAMES]; - int pshadowBits[SMP_FRAMES]; + int dlightBits; + int pshadowBits; // culling information // vec3_t bounds[2]; @@ -1280,8 +1275,8 @@ typedef struct srfVBOMesh_s int fogIndex; // dynamic lighting information - int dlightBits[SMP_FRAMES]; - int pshadowBits[SMP_FRAMES]; + int dlightBits; + int pshadowBits; // culling information vec3_t bounds[2]; @@ -1752,7 +1747,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; @@ -1798,8 +1792,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; @@ -2084,8 +2076,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; @@ -2329,11 +2319,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); @@ -2588,7 +2573,7 @@ SCENE GENERATION ============================================================ */ -void R_ToggleSmpFrame( void ); +void R_InitNextFrame( void ); void RE_ClearScene( void ); void RE_AddRefEntityToScene( const refEntity_t *ent ); @@ -2702,7 +2687,6 @@ RENDERER BACK END FUNCTIONS ============================================================= */ -void RB_RenderThread( void ); void RB_ExecuteRenderCommands( const void *data ); /* @@ -2830,9 +2814,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]; @@ -2846,20 +2828,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 ); void R_AddCapShadowmapCmd( int dlight, int cubeSide ); |