Exemplo n.º 1
0
/**
 * Send an OpenGL glFlush command to the named server.
 * This is just used to test if a CRConnection is really valid.
 */
static void
FlushConnection(int i)
{
	GET_THREAD(thread);
	if (replicate_spu.swap)
		crPackFlushSWAP();
	else
		crPackFlush();
	replicatespuFlushOne(thread, i);
}
Exemplo n.º 2
0
void PACKSPU_APIENTRY packspu_Flush( void )
{
    GET_THREAD(thread);
    int writeback=1;
    int found=0;

    if (!thread->bInjectThread)
    {
        crPackFlush();
        if (packspuSyncOnFlushes())
        {
            crPackWriteback(&writeback);
            packspuFlush( (void *) thread );
            while (writeback)
                crNetRecv();
        }
    }
    else
    {
        int i;

        crLockMutex(&_PackMutex);

        /*Make sure we process commands in order they should appear, so flush other threads first*/
        for (i=0; i<MAX_THREADS; ++i)
        {
            if (pack_spu.thread[i].inUse
                && (thread != &pack_spu.thread[i]) && pack_spu.thread[i].netServer.conn
                && pack_spu.thread[i].packer && pack_spu.thread[i].packer->currentBuffer)
            {
                packspuFlush((void *) &pack_spu.thread[i]);

                if (pack_spu.thread[i].netServer.conn->u32ClientID == thread->netServer.conn->u32InjectClientID)
                {
                    found=1;
                }

            }
        }

        if (!found)
        {
            /*Thread we're supposed to inject commands for has been detached,
              so there's nothing to sync with and we should just pass commands through our own connection.
             */
            thread->netServer.conn->u32InjectClientID=0;
        }

        packspuFlush((void *) thread);

        crUnlockMutex(&_PackMutex);
    }
}
Exemplo n.º 3
0
/* VMGL: Dropped this one in. Used to be autogenerated
   by packspu_flush.py, but that isn't invoked anymore */
void PACKSPU_APIENTRY packspu_Flush( void )
{
        GET_THREAD(thread);
        if (pack_spu.swap)
        {
            crPackFlushSWAP(  );
        }
        else
        {
            crPackFlush(  );
        }
        packspuFlush( (void *) thread );
}
Exemplo n.º 4
0
void REPLICATESPU_APIENTRY replicatespu_Flush( void )
{
	GET_THREAD(thread);
	if (replicate_spu.swap)
	{
		crPackFlushSWAP();
	}
	else
	{
		crPackFlush();
	}
	replicatespuFlushAll( (void *) thread );
}
Exemplo n.º 5
0
/**
 * Implementation of glFlush for tilesorter
 */
void TILESORTSPU_APIENTRY tilesortspu_Flush(void)
{
	GET_THREAD(thread);
	tilesortspuFlush( thread );
	if (tilesort_spu.swap)
	{
		crPackFlushSWAP();
	}
	else
	{
		crPackFlush();
	}
	tilesortspuBroadcastGeom(0);
	tilesortspuShipBuffers();
}