Esempio n. 1
0
/* VMGL: new because of DLM bit */
void PACKSPU_APIENTRY packspu_Clear( GLbitfield mask )
{
	GET_THREAD(thread);
              
	/* DLM bits for state resume */
	if (IN_DL(thread))
	    crDLMCompileClear(mask);

	if (pack_spu.swap)
	{
    	    crPackClearSWAP(mask);
	}
	else
        {
	    crPackClear(mask);
        }
        packspuFlush( (void *) thread );
}
Esempio n. 2
0
/**
 * Special case just to call Flush at end.
 * Since glClear is typically called at the start of a frame, it's a good
 * time to do a flush to detect any broken connections.  This helps to prevent
 * us from getting into the middle of a Begin/End primitive before detecting
 * a broken connection.
 */
void REPLICATESPU_APIENTRY
replicatespu_Clear( GLbitfield mask )
{
	GET_THREAD(thread);

	/* good time to check for vnc events */
	if (replicate_spu.vncAvailable)
		replicatespuCheckVncEvents();

	if (thread->currentContext->displayListMode != GL_FALSE) {
		crDLMCompileClear(mask);
	}
	if (replicate_spu.swap)
	{
		crPackClearSWAP(mask);
	}
	else
	{
		crPackClear(mask);
	}
	replicatespuFlushAll(thread);
}
Esempio n. 3
0
/**
 * Implementation of glClean for tilesorter
 * \param mask
 */
void TILESORTSPU_APIENTRY tilesortspu_Clear( GLbitfield mask )
{
	GET_THREAD(thread);
	GLenum dlMode = thread->currentContext->displayListMode;
	WindowInfo *winInfo = thread->currentContext->currentWindow;

	/* This is a good place to check for new tiling geometry when
	 * the DMX window is changed.
	 */
#ifdef USE_DMX
	if (tilesort_spu.trackWindowPosition && !dlMode) {
		if (winInfo->isDMXWindow && winInfo->xwin) {
			if (tilesortspuUpdateWindowInfo(winInfo)) {
				tilesortspuGetNewTiling(winInfo);
			}
		}
	}

	if (winInfo->newBackendWindows) {
		tilesortspuGetNewTiling(winInfo);
	}
#endif

	if (dlMode != GL_FALSE) {
		/* just creating and/or compiling display lists */
		if (tilesort_spu.lazySendDLists)
			crDLMCompileClear(mask);
		else if (tilesort_spu.swap)
			crPackClearSWAP(mask);
		else
			crPackClear(mask);
		return;
	}

	if (winInfo->passiveStereo) {
		/* only send Clear to left/right servers */
		int i;

		tilesortspuFlush( thread );

		crPackReleaseBuffer( thread->packer );

		/* Send glClear command to those servers designated as left/right
		 * which match the current glDrawBuffer setting (stereo).
		 */
		for (i = 0; i < tilesort_spu.num_servers; i++)
		{
			const ServerWindowInfo *servWinInfo = winInfo->server + i;

			if (servWinInfo->eyeFlags & thread->currentContext->stereoDestFlags) {
				crPackSetBuffer( thread->packer, &(thread->buffer[i]) );

				if (tilesort_spu.swap)
					crPackClearSWAP(mask);
				else
					crPackClear(mask);

				crPackReleaseBuffer( thread->packer );

				tilesortspuSendServerBuffer( i );
			}
		}

		/* Restore the default pack buffer */
		crPackSetBuffer( thread->packer, &(thread->geometry_buffer) );
	}
	else {
		/* not doing stereo, truly broadcast glClear */
		tilesortspuFlush( thread );
		if (tilesort_spu.swap)
			crPackClearSWAP( mask );
		else
			crPackClear( mask );
		tilesortspuBroadcastGeom(GL_TRUE);
	}
}