packspu_misc.c revision 808fa04c3a4a7a1c995190d9e28ac1792be71d58
/* Copyright (c) 2001, Stanford University
* All rights reserved
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#include "cr_packfunctions.h"
#include "packspu.h"
#include "packspu_proto.h"
void PACKSPU_APIENTRY packspu_ChromiumParametervCR(GLenum target, GLenum type, GLsizei count, const GLvoid *values)
{
int len;
switch(target)
{
case GL_GATHER_PACK_CR:
/* flush the current pack buffer */
packspuFlush( (void *) thread );
/* the connection is thread->server.conn */
len = sizeof(CRMessageGather);
break;
default:
else
}
}
{
/*Seems to still cause issues, always sync for now*/
return 1;
/*Usually buffer==GL_BACK, so put this extra check to simplify boolean eval on runtime*/
&& (buffer == GL_FRONT_LEFT
|| buffer == GL_FRONT_RIGHT
|| buffer == GL_FRONT_AND_BACK
}
{
if (hadtoflush && !packspuSyncOnFlushes())
}
void PACKSPU_APIENTRY packspu_Finish( void )
{
{
}
else
{
crPackFinish();
}
if (packspuSyncOnFlushes())
{
if (writeback)
{
else
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
}
}
}
void PACKSPU_APIENTRY packspu_Flush( void )
{
int writeback = 1;
if (!thread->bInjectThread)
{
crPackFlush();
if (packspuSyncOnFlushes())
{
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
}
}
else
{
int i;
/*Make sure we process commands in order they should appear, so flush thread being injected first*/
for (i=0; i<pack_spu.numThreads; ++i)
{
{
break;
}
}
packspuFlush((void *) thread);
}
}
{
static int num_calls = 0;
if (!thread) {
}
{
}
else
{
}
{
return num_calls++;
}
else
{
while (writeback)
crNetRecv();
{
}
return return_val;
}
}
GLboolean * residences )
{
int writeback = 1;
GLsizei i;
{
crError( "packspu_AreTexturesResident doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
}
{
}
else
{
}
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
* and the function's return value, compute the return value here.
*/
for (i = 0; i < n; i++) {
if (!residences[i]) {
break;
}
}
return return_val;
}
GLboolean * residences )
{
int writeback = 1;
GLsizei i;
{
crError( "packspu_AreProgramsResidentNV doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" );
}
{
}
else
{
}
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
* and the function's return value, compute the return value here.
*/
for (i = 0; i < n; i++) {
if (!residences[i]) {
break;
}
}
return return_val;
}
{
int writeback = 1;
{
}
else
{
}
#ifdef CR_ARB_pixel_buffer_object
#endif
{
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
}
}
{
int writeback = 1;
{
}
else
{
}
#ifdef CR_ARB_pixel_buffer_object
#endif
{
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
}
}
{
int writeback = 1;
{
}
else
{
}
#ifdef CR_ARB_pixel_buffer_object
#endif
{
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
}
}
{
int writeback = 1;
{
}
else
{
}
#ifdef CR_ARB_pixel_buffer_object
#endif
{
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
}
}
#ifdef CHROMIUM_THREADSAFE
void PACKSPU_APIENTRY packspu_VBoxPackSetInjectThread(void)
{
{
}
}
{
{
}
return ret;
}
{
{
}
}
#else /*ifdef CHROMIUM_THREADSAFE*/
void PACKSPU_APIENTRY packspu_VBoxPackSetInjectThread(void)
{
}
{
return 0;
}
{
(void) id;
}
#endif /*CHROMIUM_THREADSAFE*/