mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-28 03:35:19 +01:00
ref: gl: psvita: fix long hang on shutdown
This commit is contained in:
parent
47a6be86b1
commit
76bff9cd4b
@ -335,7 +335,8 @@ void VGL_ShimShutdown( void )
|
||||
if ( !vgl_init )
|
||||
return;
|
||||
|
||||
glFinish();
|
||||
// flush everything that has been rendered this frame to prevent waiting in glDeleteProgram
|
||||
vglSwapBuffers( GL_FALSE );
|
||||
glUseProgram( 0 );
|
||||
|
||||
for ( i = 0; i < MAX_PROGS; ++i )
|
||||
@ -379,13 +380,6 @@ void VGL_End( void )
|
||||
if ( !vgl.prim || !count )
|
||||
goto _leave; // end without begin
|
||||
|
||||
if ( vgl.end > VGL_MAX_VERTS )
|
||||
{
|
||||
gEngfuncs.Con_Reportf( S_ERROR "VGL_End(): Ran out of vertex space (%d overhead)\n", vgl.end - VGL_MAX_VERTS );
|
||||
vgl.end = 0;
|
||||
goto _leave;
|
||||
}
|
||||
|
||||
// enable alpha test and fog if needed
|
||||
if ( alpha_test_state )
|
||||
flags |= 1 << VGL_FLAG_ALPHA_TEST;
|
||||
@ -425,7 +419,7 @@ void VGL_Vertex3f( GLfloat x, GLfloat y, GLfloat z )
|
||||
++vgl.end;
|
||||
if ( vgl.end >= VGL_MAX_VERTS )
|
||||
{
|
||||
gEngfuncs.Con_Reportf( S_ERROR "VGL_Vertex3f(): Vertex buffer overflow!\n" );
|
||||
gEngfuncs.Con_DPrintf( S_ERROR "VGL_Vertex3f(): Vertex buffer overflow!\n" );
|
||||
vgl.end = vgl.begin = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user