cr_server.h revision 2609df5222cfcceb51ec536b2e3173b7227a232a
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay/* Copyright (c) 2001, Stanford University
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay * All rights reserved.
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay * See the file LICENSE.txt for information on redistributing this software.
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay/*@todo must match MaxGuestMonitors from SchemaDefs.h*/
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemaytypedef DECLCALLBACKPTR(void, PFNCRSERVERPRESENTFBO) (void *data, int32_t screenId, int32_t x, int32_t y, uint32_t w, uint32_t h);
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay/* Callbacks for output of the rendered frames.
35a0c21a3150b1c01572f6075d6240eebd301415Jason Lemay * This allows to pass rendered frames to an external component rather than draw them on screen.
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay * An external component registers the redirection callbacks using crVBoxServerOutputRedirectSet.
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay * The list of formats supported by the caller is obtained using CRORContextProperty.
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay * The actual format choosed by the service is passed as a CRORBegin parameter.
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemaytypedef struct {
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay const void *pvContext; /* Supplied by crVBoxServerOutputRedirectSet. */
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay DECLR3CALLBACKMEMBER(void, CRORBegin, (const void *pvContext, void **ppvInstance,
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay const char *pszFormat));
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay DECLR3CALLBACKMEMBER(void, CRORGeometry, (void *pvInstance,
3b9de50fdf0980762d6930a49e1a0f20b61a6f6bJason Lemay DECLR3CALLBACKMEMBER(void, CRORVisibleRegion, (void *pvInstance,
} CRExtent;
struct BucketingInfo;
int screenId;
void *pvOutputRedirectInstance;
} CRMuralInfo;
typedef struct _crclient {
#ifdef VBOXCR_LOGFPS
} CRClient;
typedef struct _crclientnode {
} CRClientNode;
typedef struct CRPoly_t {
int npoints;
double *points;
} CRPoly;
typedef struct RunQueue_t {
int blocked;
} RunQueue;
int32_t x, y;
uint32_t w, h;
} CRScreenInfo;
unsigned short tcpip_port;
int screenCount;
int numClients;
int client_spu_id;
int mtu;
int buffer_size;
int useL2;
int ignore_papi;
unsigned int maxBarrierCount;
unsigned int clearCount;
int optimizeBucket;
int only_swap_once;
int debug_barriers;
int sharedDisplayLists;
int sharedTextureObjects;
int sharedPrograms;
int sharedWindows;
int uniqueWindows;
int localTileSpec;
int useDMX;
int overlapBlending;
const char *vpProjectionMatrixVariable;
int stereoView;
int currentEye;
float *overlap_intens;
int num_overlap_intens;
int num_overlap_levels;
} CRServer;
extern DECLEXPORT(int32_t) crVBoxServerClientWrite(uint32_t u32ClientID, uint8_t *pBuffer, uint32_t cbBuffer);
extern DECLEXPORT(int32_t) crVBoxServerClientRead(uint32_t u32ClientID, uint8_t *pBuffer, uint32_t *pcbBuffer);
extern DECLEXPORT(int32_t) crVBoxServerClientSetVersion(uint32_t u32ClientID, uint32_t vMajor, uint32_t vMinor);
extern DECLEXPORT(int32_t) crVBoxServerMapScreen(int sIndex, int32_t x, int32_t y, uint32_t w, uint32_t h, uint64_t winID);
#ifdef VBOX_WITH_CRHGSMI
/* We moved all CrHgsmi command processing to crserverlib to keep the logic of dealing with CrHgsmi commands in one place.
* For now we need the notion of CrHgdmi commands in the crserver_lib to be able to complete it asynchronously once it is really processed.
* This help avoiding the "blocked-client" issues. The client is blocked if another client is doing begin-end stuff.
* For now we eliminated polling that could occur on block, which caused a higher-priority thread (in guest) polling for the blocked command complition
* In the future we will extend CrHgsmi functionality to maintain texture data directly in CrHgsmi allocation to avoid extra memcpy-ing with PBO,
* implement command completion and stuff necessary for GPU scheduling to work properly for WDDM Windows guests, etc.
#ifdef __cplusplus