VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h@ 55761

最後變更 在這個檔案從55761是 55761,由 vboxsync 提交於 10 年 前

3D: saving state: use separate buffers for DEPTH and STENCIL data. Needs more testing.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 20.3 KB
 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved.
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#ifndef INCLUDE_CR_SERVER_H
8#define INCLUDE_CR_SERVER_H
9
10#include "cr_spu.h"
11#include "cr_net.h"
12#include "cr_hash.h"
13#include "cr_protocol.h"
14#include "cr_glstate.h"
15#include "cr_vreg.h"
16#include "cr_blitter.h"
17#include "cr_htable.h"
18#include "spu_dispatch_table.h"
19#include "cr_dump.h"
20
21#include "state/cr_currentpointers.h"
22
23#include <iprt/types.h>
24#include <iprt/err.h>
25#include <iprt/string.h>
26#include <iprt/list.h>
27#include <iprt/thread.h>
28#include <iprt/critsect.h>
29#include <iprt/semaphore.h>
30#include <iprt/memcache.h>
31
32#include <VBox/vmm/ssm.h>
33
34#include <VBox/VBoxVideo.h>
35#include <VBox/Hardware/VBoxVideoVBE.h>
36#include <VBox/VBoxVideo3D.h>
37#include <VBox/VBoxVideoHost3D.h>
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#define CR_MAX_WINDOWS 100
44#define CR_MAX_CLIENTS 64
45
46/*@todo must match MaxGuestMonitors from SchemaDefs.h*/
47#define CR_MAX_GUEST_MONITORS VBOX_VIDEO_MAX_SCREENS
48
49typedef DECLCALLBACKPTR(void, PFNCRSERVERPRESENTFBO) (void *data, int32_t screenId, int32_t x, int32_t y, uint32_t w, uint32_t h);
50
51/* Callbacks for output of the rendered frames.
52 *
53 * This allows to pass rendered frames to an external component rather than draw them on screen.
54 *
55 * An external component registers the redirection callbacks using crVBoxServerOutputRedirectSet.
56 *
57 * The list of formats supported by the caller is obtained using CRORContextProperty.
58 * The actual format choosed by the service is passed as a CRORBegin parameter.
59 */
60typedef struct {
61 const void *pvContext; /* Supplied by crVBoxServerOutputRedirectSet. */
62 DECLR3CALLBACKMEMBER(void, CRORBegin, (const void *pvContext, void **ppvInstance,
63 const char *pszFormat));
64 DECLR3CALLBACKMEMBER(void, CRORGeometry, (void *pvInstance,
65 int32_t x, int32_t y, uint32_t w, uint32_t h));
66 DECLR3CALLBACKMEMBER(void, CRORVisibleRegion, (void *pvInstance,
67 uint32_t cRects, const RTRECT *paRects));
68 DECLR3CALLBACKMEMBER(void, CRORFrame, (void *pvInstance,
69 void *pvData, uint32_t cbData));
70 DECLR3CALLBACKMEMBER(void, CROREnd, (void *pvInstance));
71 DECLR3CALLBACKMEMBER(int, CRORContextProperty, (const void *pvContext, uint32_t index,
72 void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut));
73} CROutputRedirect;
74
75typedef struct {
76 CRrecti imagewindow; /**< coordinates in mural space */
77 CRrectf bounds; /**< normalized coordinates in [-1,-1] x [1,1] */
78 CRrecti outputwindow; /**< coordinates in server's rendering window */
79 CRrecti clippedImagewindow; /**< imagewindow clipped to current viewport */
80 CRmatrix baseProjection; /**< pre-multiplied onto projection matrix */
81 CRrecti scissorBox; /**< passed to back-end OpenGL */
82 CRrecti viewport; /**< passed to back-end OpenGL */
83 GLuint serialNo; /**< an optimization */
84} CRExtent;
85
86struct BucketingInfo;
87
88typedef struct {
89 char *pszDpyName;
90 GLint visualBits;
91 int32_t externalID;
92} CRCreateInfo_t;
93
94typedef struct {
95 char *pszDpyName;
96 int32_t externalID;
97 GLint requestedVisualBits;
98 GLint realVisualBits;
99} CRCreateInfoEx_t;
100
101/* VRAM->RAM worker thread */
102
103typedef enum
104{
105 CR_SERVER_RPW_STATE_UNINITIALIZED = 0,
106 CR_SERVER_RPW_STATE_INITIALIZING,
107 CR_SERVER_RPW_STATE_INITIALIZED,
108 CR_SERVER_RPW_STATE_UNINITIALIZING,
109} CR_SERVER_RPW_STATE;
110
111/* worker control command */
112typedef enum
113{
114 CR_SERVER_RPW_CTL_TYPE_UNDEFINED = 0,
115 CR_SERVER_RPW_CTL_TYPE_WAIT_COMPLETE,
116 CR_SERVER_RPW_CTL_TYPE_TERM
117} CR_SERVER_RPW_CTL_TYPE;
118
119struct CR_SERVER_RPW_ENTRY;
120
121typedef struct CR_SERVER_RPW_CTL {
122 CR_SERVER_RPW_CTL_TYPE enmType;
123 int rc;
124 RTSEMEVENT hCompleteEvent;
125 /* valid for *_WAIT_COMPLETE and *_CANCEL */
126 struct CR_SERVER_RPW_ENTRY *pEntry;
127} CR_SERVER_RPW_CTL;
128
129
130struct CR_SERVER_RPW_ENTRY;
131
132typedef DECLCALLBACKPTR(void, PFNCR_SERVER_RPW_DATA) (const struct CR_SERVER_RPW_ENTRY* pEntry, void *pvEntryTexData);
133
134typedef DECLCALLBACKPTR(void, PFNCRSERVERNOTIFYEVENT) (int32_t screenId, uint32_t uEvent, void* pvData, uint32_t cbData);
135
136typedef struct CR_SERVER_RPW_ENTRY
137{
138 RTRECTSIZE Size;
139 /* We have to use 4 textures here.
140 *
141 * 1. iDrawTex - the texture clients can draw to and then submit it for contents acquisition via crServerRpwEntrySubmit
142 * 2. iSubmittedTex - the texture submitted to the worker for processing and, whose processing has not start yet,
143 * i.e. it is being in the queue and can be safely removed/replaced [from] there
144 * 3. iWorkerTex - the texture being prepared & passed by the worker to the GPU (stage 1 of a worker contents acquisition process)
145 * 4. iGpuTex - the texture passed/processed to/by the GPU, whose data is then acquired by the server (stage 2 of a worker contents acquisition process)
146 *
147 * - There can be valid distinct iGpuTex, iWorkerTex, iSubmittedTex and iDrawTex present simultaneously.
148 * - Either or both of iSubmittedTex and iFreeTex are always valid
149 *
150 * Detail:
151 *
152 * - iSubmittedTex and iFreeTex modifications are performed under CR_SERVER_RPW::CritSect lock.
153 *
154 * - iDrawTex can only be changed by client side (i.e. the crServerRpwEntrySubmit caller), this is why client thread can access it w/o a lock
155 * - iSubmittedTex and iFreeTex can be modified by both client and worker, so lock is always required
156 *
157 * - iDrawTex can be accessed by client code only
158 * - iWorkerTex and iGpuTex can be accessed by worker code only
159 * - iSubmittedTex and iFreeTex can be accessed under CR_SERVER_RPW::CritSect lock only
160 * - either or both of iSubmittedTex and iFreeTex are always valid (see below for more explanation),
161 * this is why client can easily determine the new iDrawTex value on Submit, i.e. :
162 *
163 * (if initial iSubmittedTex was valid)
164 * ---------------
165 * | ^
166 * > |
167 * Submit-> iDrawTex -> iSubmittedTex
168 * ^
169 * | (if initial iSubmittedTex was NOT valid)
170 * iFreeTex
171 *
172 * - The worker can invalidate the iSubmittedTex (i.e. do iSubmittedTex -> iWorkerTex) only after it is done
173 * with the last iWorkerTex -> iGpuTex transformation freeing the previously used iGpuTex to iFreeTex.
174 *
175 * - A simplified worker iXxxTex transformation logic is:
176 * 1. iFreeTex is initially valid
177 * 2. iSubmittedTex -> iWorkerTex;
178 * 3. submit iWorkerTex acquire request to the GPU
179 * 4. complete current iGpuTex
180 * 5. iGpuTex -> iFreeTex
181 * 6. iWorkerTex -> iGpuTex
182 * 7. goto 1
183 *
184 * */
185 int8_t iTexDraw;
186 int8_t iTexSubmitted;
187 int8_t iTexWorker;
188 int8_t iTexGpu;
189 int8_t iCurPBO;
190 GLuint aidWorkerTexs[4];
191 GLuint aidPBOs[2];
192 RTLISTNODE WorkEntry;
193 RTLISTNODE WorkerWorkEntry;
194 RTLISTNODE GpuSubmittedEntry;
195 PFNCR_SERVER_RPW_DATA pfnData;
196} CR_SERVER_RPW_ENTRY;
197
198typedef struct CR_SERVER_RPW {
199 RTLISTNODE WorkList;
200 RTCRITSECT CritSect;
201 RTSEMEVENT hSubmitEvent;
202 /* only one outstanding command is supported,
203 * and ctl requests must be cynchronized, hold it right here */
204 CR_SERVER_RPW_CTL Ctl;
205 int ctxId;
206 GLint ctxVisBits;
207 RTTHREAD hThread;
208} CR_SERVER_RPW;
209/* */
210
211/* FRAMEBUFFER */
212typedef struct CR_FRAMEBUFFER *HCR_FRAMEBUFFER;
213typedef struct CR_FRAMEBUFFER_ENTRY *HCR_FRAMEBUFFER_ENTRY;
214/* */
215
216typedef struct CR_FBDATA
217{
218 HCR_FRAMEBUFFER hFb;
219 HCR_FRAMEBUFFER_ENTRY hFbEntry;
220 CR_TEXDATA* apTexDatas[2];
221} CR_FBDATA;
222/**
223 * Mural info
224 */
225typedef struct {
226 GLuint width, height;
227 GLint gX, gY; /*guest coordinates*/
228 GLint hX, hY; /*host coordinates, screenID related*/
229
230 int spuWindow; /*the SPU's corresponding window ID */
231
232 int screenId;
233
234 GLboolean bVisible; /*guest window is visible*/
235 GLubyte u8Unused; /*redirect to FBO instead of real host window*/
236 GLboolean bFbDraw; /*GL_FRONT buffer is drawn to directly*/
237 GLboolean fIsDummyRefference;
238
239 GLint cVisibleRects; /*count of visible rects*/
240 GLint *pVisibleRects; /*visible rects left, top, right, bottom*/
241 GLboolean bReceivedRects; /*indicates if guest did any updates for visible regions*/
242
243 GLuint cBuffers;
244 GLuint iBbBuffer;
245 GLuint aidFBOs[2];
246 GLuint aidColorTexs[2];
247
248 void *pvReserved;
249
250 CRCreateInfoEx_t CreateInfo;
251
252 /* to avoid saved state breakage we need to keep RT_OFFSETOF(CRMuralInfo, CreateInfo) intact
253 * this is why we place some FBO stuff to the tail
254 * @todo: once we need to increment a saved state version, we could refactor this structure */
255 GLint iCurDrawBuffer;
256 GLint iCurReadBuffer;
257
258 GLuint idDepthRB;
259 GLuint idStencilRB;
260 GLuint fboWidth, fboHeight;
261
262 GLboolean fHasParentWindow;
263
264 GLboolean fRedirected;
265 GLboolean fForcePresentState;
266 GLboolean fOrPresentOnReenable;
267
268 GLboolean fIsVisible;
269
270 CR_TEXDATA aTexs[2];
271 uint32_t cUsedFBDatas;
272 CR_FBDATA *apUsedFBDatas[CR_MAX_GUEST_MONITORS];
273 CR_FBDATA aFBDatas[CR_MAX_GUEST_MONITORS];
274
275 /* bitfield representing contexts the mural has been ever current with
276 * we just reuse CR_STATE_SHAREDOBJ_USAGE_XXX API here for simplicity */
277 CRbitvalue ctxUsage[CR_MAX_BITARRAY];
278} CRMuralInfo;
279
280typedef struct {
281 CRContext *pContext;
282 int SpuContext;
283 CRCreateInfoEx_t CreateInfo;
284 CRMuralInfo * currentMural;
285} CRContextInfo;
286
287/**
288 * A client is basically an upstream Cr Node (connected via mothership)
289 */
290typedef struct _crclient {
291 int spu_id; /**< id of the last SPU in the client's SPU chain */
292 CRConnection *conn; /**< network connection from the client */
293 int number; /**< a unique number for each client */
294 uint64_t pid; /*guest pid*/
295 GLint currentContextNumber;
296 CRContextInfo *currentCtxInfo;
297 GLint currentWindow;
298 CRMuralInfo *currentMural;
299 GLint windowList[CR_MAX_WINDOWS];
300 GLint contextList[CR_MAX_CONTEXTS];
301#ifdef VBOXCR_LOGFPS
302 uint64_t timeUsed;
303#endif
304} CRClient;
305
306typedef struct _crclientnode {
307 CRClient *pClient;
308 struct _crclientnode *prev, *next;
309} CRClientNode;
310
311typedef struct CRPoly_t {
312 int npoints;
313 double *points;
314 struct CRPoly_t *next;
315} CRPoly;
316
317/**
318 * There's one of these run queue entries per client
319 * The run queue is a circular, doubly-linked list of these objects.
320 */
321typedef struct RunQueue_t {
322 CRClient *client;
323 int blocked;
324 struct RunQueue_t *next;
325 struct RunQueue_t *prev;
326} RunQueue;
327
328typedef struct {
329 GLint freeWindowID;
330 GLint freeContextID;
331 GLint freeClientID;
332} CRServerFreeIDsPool_t;
333
334typedef struct {
335 int32_t x, y;
336 uint32_t w, h;
337 uint64_t winID;
338} CRScreenInfo;
339
340typedef struct {
341 RTRECT Rect;
342} CRScreenViewportInfo;
343
344/* BFB (BlitFramebuffer Blitter) flags
345 * so far only CR_SERVER_BFB_ON_ALWAIS is supported and is alwais used if any flag is set */
346#define CR_SERVER_BFB_DISABLED 0
347#define CR_SERVER_BFB_ON_INVERTED_BLIT 1
348#define CR_SERVER_BFB_ON_STRAIGHT_BLIT 2
349#define CR_SERVER_BFB_ON_ALWAIS (CR_SERVER_BFB_ON_INVERTED_BLIT | CR_SERVER_BFB_ON_STRAIGHT_BLIT)
350
351typedef struct {
352 unsigned short tcpip_port;
353
354 CRScreenInfo screen[CR_MAX_GUEST_MONITORS];
355 CRScreenViewportInfo screenVieport[CR_MAX_GUEST_MONITORS];
356 int screenCount;
357
358 GLboolean fCrCmdEnabled;
359
360 GLboolean fProcessingPendedCommands;
361
362 int numClients;
363 CRClient *clients[CR_MAX_CLIENTS]; /**< array [numClients] */
364 CRClient *curClient;
365 CRClientNode *pCleanupClient; /*list of clients with pending clean up*/
366 CRHTABLE clientTable;
367 CRCurrentStatePointers current;
368
369 GLboolean firstCallCreateContext;
370 GLboolean firstCallMakeCurrent;
371 GLboolean bIsInLoadingState; /* Indicates if we're in process of loading VM snapshot */
372 GLboolean bIsInSavingState; /* Indicates if we're in process of saving VM snapshot */
373 GLboolean bForceMakeCurrentOnClientSwitch;
374 CRContextInfo *currentCtxInfo;
375 GLint currentWindow;
376 GLint currentNativeWindow;
377 CRMuralInfo *currentMural;
378
379 CRHashTable *muralTable; /**< hash table where all murals are stored */
380
381 int client_spu_id;
382
383 int mtu;
384 int buffer_size;
385 char protocol[1024];
386
387 SPU *head_spu;
388 SPUDispatchTable dispatch;
389
390 CRNetworkPointer return_ptr;
391 CRNetworkPointer writeback_ptr;
392
393 CRLimitsState limits; /**< GL limits for any contexts we create */
394
395 CRContextInfo MainContextInfo;
396
397 CRHashTable *contextTable; /**< hash table for rendering contexts */
398
399 CRHashTable *programTable; /**< for vertex programs */
400 GLuint currentProgram;
401
402 /* visBits -> dummy mural association */
403 CRHashTable *dummyMuralTable;
404
405 GLboolean fRootVrOn;
406 VBOXVR_LIST RootVr;
407 /* we need to translate Root Vr to each window coords, this one cpecifies the current translation point
408 * note that since window attributes modifications is performed in HGCM thread only and thus is serialized,
409 * we deal with the global RootVr data directly */
410 RTPOINT RootVrCurPoint;
411
412 /* blitter so far used for working around host drivers BlitFramebuffer bugs
413 * by implementing */
414 uint32_t fBlitterMode;
415 CR_BLITTER Blitter;
416
417 CR_SERVER_RPW RpwWorker;
418
419 VBOXCRCMDCTL_HGCMDISABLE_DATA DisableData;
420
421 RTSEMEVENT hCalloutCompletionEvent;
422 VBOXCRCMDCTL *pCurrentCalloutCtl;
423 VBOXCRCLIENT_INFO ClientInfo;
424
425 /** configuration options */
426 /*@{*/
427 int useL2;
428 int ignore_papi;
429 unsigned int maxBarrierCount;
430 unsigned int clearCount;
431 int optimizeBucket;
432 int only_swap_once;
433 int debug_barriers;
434 int sharedDisplayLists;
435 int sharedTextureObjects;
436 int sharedPrograms;
437 int sharedWindows;
438 int uniqueWindows;
439 int localTileSpec;
440 int useDMX;
441 int overlapBlending;
442 int vpProjectionMatrixParameter;
443 const char *vpProjectionMatrixVariable;
444 int stereoView;
445 int vncMode; /* cmd line option */
446 /*@}*/
447 /** view_matrix config */
448 /*@{*/
449 GLboolean viewOverride;
450 CRmatrix viewMatrix[2]; /**< left and right eye */
451 /*@}*/
452 /** projection_matrix config */
453 /*@{*/
454 GLboolean projectionOverride;
455 CRmatrix projectionMatrix[2]; /**< left and right eye */
456 int currentEye;
457 /*@}*/
458
459 /** for warped tiles */
460 /*@{*/
461 GLfloat alignment_matrix[16], unnormalized_alignment_matrix[16];
462 /*@}*/
463
464 /** tile overlap/blending info - this should probably be per-mural */
465 /*@{*/
466 CRPoly **overlap_geom;
467 CRPoly *overlap_knockout;
468 float *overlap_intens;
469 int num_overlap_intens;
470 int num_overlap_levels;
471 /*@}*/
472
473 CRHashTable *barriers, *semaphores;
474
475 RunQueue *run_queue;
476
477 GLuint currentSerialNo;
478
479 GLuint fVisualBitsDefault;
480 GLboolean bUsePBOForReadback; /*Use PBO's for data readback*/
481
482 CROutputRedirect outputRedirect;
483
484 GLboolean bUseMultipleContexts;
485
486 GLboolean bWindowsInitiallyHidden;
487
488 /* OR-ed CR_VBOX_CAP_XXX cap values
489 * describing VBox Chromium functionality caps visible to guest
490 * Currently can have only CR_VBOX_CAP_TEX_PRESENT cap to notify
491 * that the TexPresent mechanism is available and enabled */
492 uint32_t u32Caps;
493
494 PFNCRSERVERNOTIFYEVENT pfnNotifyEventCB;
495
496 SPUDispatchTable TmpCtxDispatch;
497
498 VBOXCRCMD_SVRENABLE_INFO CrCmdClientInfo;
499
500#ifdef VBOX_WITH_CRSERVER_DUMPER
501 CR_RECORDER Recorder;
502 CR_BLITTER RecorderBlitter;
503 CR_DBGPRINT_DUMPER DbgPrintDumper;
504 CR_HTML_DUMPER HtmlDumper;
505 CR_DUMPER *pDumper;
506#endif
507
508 int RcToGuest;
509 int RcToGuestOnce;
510} CRServer;
511
512
513extern DECLEXPORT(void) crServerInit( int argc, char *argv[] );
514extern DECLEXPORT(int) CRServerMain( int argc, char *argv[] );
515extern DECLEXPORT(void) crServerServiceClients(void);
516extern DECLEXPORT(void) crServerAddNewClient(void);
517extern DECLEXPORT(SPU*) crServerHeadSPU(void);
518extern DECLEXPORT(void) crServerSetPort(int port);
519
520extern DECLEXPORT(GLboolean) crVBoxServerInit(void);
521extern DECLEXPORT(void) crVBoxServerTearDown(void);
522extern DECLEXPORT(int32_t) crVBoxServerAddClient(uint32_t u32ClientID);
523extern DECLEXPORT(void) crVBoxServerRemoveClient(uint32_t u32ClientID);
524extern DECLEXPORT(int32_t) crVBoxServerClientWrite(uint32_t u32ClientID, uint8_t *pBuffer, uint32_t cbBuffer);
525extern DECLEXPORT(int32_t) crVBoxServerClientRead(uint32_t u32ClientID, uint8_t *pBuffer, uint32_t *pcbBuffer);
526extern DECLEXPORT(int32_t) crVBoxServerClientSetVersion(uint32_t u32ClientID, uint32_t vMajor, uint32_t vMinor);
527extern DECLEXPORT(int32_t) crVBoxServerClientGetCapsLegacy(uint32_t u32ClientID, uint32_t *pu32Caps);
528extern DECLEXPORT(int32_t) crVBoxServerClientGetCapsNew(uint32_t u32ClientID, CR_CAPS_INFO *pInfo);
529extern DECLEXPORT(int32_t) crVBoxServerClientSetPID(uint32_t u32ClientID, uint64_t pid);
530
531extern DECLEXPORT(int32_t) crVBoxServerSaveState(PSSMHANDLE pSSM);
532extern DECLEXPORT(int32_t) crVBoxServerLoadState(PSSMHANDLE pSSM, uint32_t version);
533
534typedef struct
535{
536 CR_BLITTER_IMG Img;
537 uint32_t u32Screen;
538 uint32_t fDataAllocated;
539} CR_SCREENSHOT;
540
541extern DECLEXPORT(int) crServerVBoxWindowsShow(bool fShow);
542extern DECLEXPORT(int) crServerVBoxScreenshotGet(uint32_t u32Screen, uint32_t width, uint32_t height, uint32_t pitch, void *pvBuffer, CR_SCREENSHOT *pScreenshot);
543extern DECLEXPORT(void) crServerVBoxScreenshotRelease(CR_SCREENSHOT *pScreenshot);
544
545extern DECLEXPORT(void) crServerVBoxCompositionSetEnableStateGlobal(GLboolean fEnable);
546extern DECLEXPORT(int32_t) crVBoxServerSetScreenCount(int sCount);
547extern DECLEXPORT(int32_t) crVBoxServerUnmapScreen(int sIndex);
548extern DECLEXPORT(int32_t) crVBoxServerMapScreen(int sIndex, int32_t x, int32_t y, uint32_t w, uint32_t h, uint64_t winID);
549extern DECLEXPORT(void) crServerVBoxCompositionSetEnableStateGlobal(GLboolean fEnable);
550struct VBVAINFOSCREEN;
551extern DECLEXPORT(int) crVBoxServerNotifyResize(const struct VBVAINFOSCREEN *pScreen, void *pvVRAM);
552extern DECLEXPORT(int32_t) crVBoxServerSetRootVisibleRegion(GLint cRects, const RTRECT *pRects);
553
554extern DECLEXPORT(int32_t) crVBoxServerSetOffscreenRendering(GLboolean value);
555
556extern DECLEXPORT(int32_t) crVBoxServerOutputRedirectSet(const CROutputRedirect *pCallbacks);
557
558extern DECLEXPORT(int32_t) crVBoxServerSetScreenViewport(int sIndex, int32_t x, int32_t y, uint32_t w, uint32_t h);
559
560extern DECLEXPORT(void) crServerVBoxSetNotifyEventCB(PFNCRSERVERNOTIFYEVENT pfnCb);
561
562extern DECLEXPORT(void) crVBoxServerCalloutEnable(VBOXCRCMDCTL *pCtl);
563extern DECLEXPORT(void) crVBoxServerCalloutDisable();
564extern DECLEXPORT(void) crServerSetUnscaledHiDPI(bool fEnable);
565
566#ifdef VBOX_WITH_CRHGSMI
567/* We moved all CrHgsmi command processing to crserverlib to keep the logic of dealing with CrHgsmi commands in one place.
568 *
569 * 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.
570 * This help avoiding the "blocked-client" issues. The client is blocked if another client is doing begin-end stuff.
571 * For now we eliminated polling that could occur on block, which caused a higher-priority thread (in guest) polling for the blocked command complition
572 * to block the lower-priority thread trying to complete the blocking command.
573 * And removed extra memcpy done on blocked command arrival.
574 *
575 * In the future we will extend CrHgsmi functionality to maintain texture data directly in CrHgsmi allocation to avoid extra memcpy-ing with PBO,
576 * implement command completion and stuff necessary for GPU scheduling to work properly for WDDM Windows guests, etc.
577 *
578 * NOTE: it is ALWAYS responsibility of the crVBoxServerCrHgsmiCmd to complete the command!
579 * */
580extern DECLEXPORT(int32_t) crVBoxServerCrHgsmiCmd(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, uint32_t cbCmd);
581extern DECLEXPORT(int32_t) crVBoxServerCrHgsmiCtl(struct VBOXVDMACMD_CHROMIUM_CTL *pCtl, uint32_t cbCtl);
582
583#endif
584
585extern DECLEXPORT(int32_t) crVBoxServerHgcmEnable(VBOXCRCMDCTL_HGCMENABLE_DATA *pData);
586extern DECLEXPORT(int32_t) crVBoxServerHgcmDisable(VBOXCRCMDCTL_HGCMDISABLE_DATA *pData);
587
588extern int crVBoxServerHostCtl(VBOXCRCMDCTL *pCtl, uint32_t cbCtl);
589
590#ifdef __cplusplus
591}
592#endif
593
594#endif
595
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette