Changeset 43932 in vbox for trunk/src/VBox/GuestHost/OpenGL/include
- Timestamp:
- Nov 21, 2012 7:28:05 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r43890 r43932 79 79 struct BucketingInfo; 80 80 81 /**82 * Mural info83 */84 typedef struct {85 GLuint width, height;86 GLint gX, gY; /*guest coordinates*/87 GLint hX, hY; /*host coordinates, screenID related*/88 89 int spuWindow; /*the SPU's corresponding window ID */90 91 int screenId;92 93 GLboolean bVisible; /*guest window is visible*/94 GLboolean bUseFBO; /*redirect to FBO instead of real host window*/95 GLboolean bFbDraw; /*GL_FRONT buffer is drawn to directly*/96 97 GLint cVisibleRects; /*count of visible rects*/98 GLint *pVisibleRects; /*visible rects left, top, right, bottom*/99 GLboolean bReceivedRects; /*indicates if guest did any updates for visible regions*/100 101 GLuint idFBO, idColorTex, idDepthStencilRB;102 GLuint fboWidth, fboHeight;103 GLuint idPBO;104 105 void *pvOutputRedirectInstance;106 } CRMuralInfo;107 108 81 typedef struct { 109 82 char *pszDpyName; … … 111 84 int32_t externalID; 112 85 } CRCreateInfo_t; 86 87 /** 88 * Mural info 89 */ 90 typedef struct { 91 GLuint width, height; 92 GLint gX, gY; /*guest coordinates*/ 93 GLint hX, hY; /*host coordinates, screenID related*/ 94 95 int spuWindow; /*the SPU's corresponding window ID */ 96 97 int screenId; 98 99 GLboolean bVisible; /*guest window is visible*/ 100 GLubyte fUseFBO; /*redirect to FBO instead of real host window*/ 101 GLboolean bFbDraw; /*GL_FRONT buffer is drawn to directly*/ 102 103 GLint cVisibleRects; /*count of visible rects*/ 104 GLint *pVisibleRects; /*visible rects left, top, right, bottom*/ 105 GLboolean bReceivedRects; /*indicates if guest did any updates for visible regions*/ 106 107 GLuint idFBO, idColorTex, idDepthStencilRB; 108 GLuint fboWidth, fboHeight; 109 GLuint idPBO; 110 111 void *pvOutputRedirectInstance; 112 113 CRCreateInfo_t CreateInfo; 114 } CRMuralInfo; 113 115 114 116 typedef struct { … … 225 227 } CR_BLITTER, *PCR_BLITTER; 226 228 227 int CrBltInit(PCR_BLITTER pBlitter, CRMuralInfo *pCurrentMural , GLint visualBits);229 int CrBltInit(PCR_BLITTER pBlitter, CRMuralInfo *pCurrentMural); 228 230 void CrBltTerm(PCR_BLITTER pBlitter); 229 231 … … 244 246 void CrBltBlitTexMural(PCR_BLITTER pBlitter, CR_BLITTER_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags); 245 247 void CrBltBlitTexTex(PCR_BLITTER pBlitter, CR_BLITTER_TEXTURE *pSrc, const RTRECT *pSrcRect, CR_BLITTER_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags); 248 void CrBltPresent(PCR_BLITTER pBlitter); 246 249 /* */ 247 250 … … 253 256 typedef FNCRDISPLAY_REGIONS_CHANGED *PFNCRDISPLAY_REGIONS_CHANGED; 254 257 255 typedef DECLCALLBACK(int) FNCRDISPLAY_DRAW_ENTRY(struct CR_PRESENTER *pPresenter, struct CR_PRESENTER_ENTRY *pEntry, PCR_BLITTER pBlitter );258 typedef DECLCALLBACK(int) FNCRDISPLAY_DRAW_ENTRY(struct CR_PRESENTER *pPresenter, struct CR_PRESENTER_ENTRY *pEntry, PCR_BLITTER pBlitter, bool *pfAllEntriesDrawn); 256 259 typedef FNCRDISPLAY_DRAW_ENTRY *PFNCRDISPLAY_DRAW_ENTRY; 257 260 … … 265 268 CR_BLITTER_TEXTURE Texture; 266 269 RTPOINT Pos; 270 uint32_t cRects; 267 271 PRTRECT paSrcRects; 268 272 PRTRECT paDstRects; 269 uint32_t cRects;270 273 } CR_PRESENTER_ENTRY, *PCR_PRESENTER_ENTRY; 271 274 … … 285 288 286 289 287 DECLCALLBACK(int) CrPtCbDrawEntrySingle(struct CR_PRESENTER *pPresenter, struct CR_PRESENTER_ENTRY *pEntry, PCR_BLITTER pBlitter );288 DECLCALLBACK(int) CrPtCbDrawEntryAll(struct CR_PRESENTER *pPresenter, struct CR_PRESENTER_ENTRY *pEntry, PCR_BLITTER pBlitter );290 DECLCALLBACK(int) CrPtCbDrawEntrySingle(struct CR_PRESENTER *pPresenter, struct CR_PRESENTER_ENTRY *pEntry, PCR_BLITTER pBlitter, bool *pfAllEntriesDrawn); 291 DECLCALLBACK(int) CrPtCbDrawEntryAll(struct CR_PRESENTER *pPresenter, struct CR_PRESENTER_ENTRY *pEntry, PCR_BLITTER pBlitter, bool *pfAllEntriesDrawn); 289 292 290 293 DECLINLINE(void) CrPtEntryInit(PCR_PRESENTER_ENTRY pEntry, PCR_BLITTER_TEXTURE pTextureData) … … 298 301 return VBoxVrCompositorEntryIsInList(&pEntry->Ce); 299 302 } 300 int CrPtEntryPresent(PCR_PRESENTER pPresenter, PCR_PRESENTER_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions, PCR_BLITTER pBlitter); 303 int CrPtPresent(PCR_PRESENTER pPresenter, PCR_BLITTER pBlitter); 304 int CrPtPresentEntry(PCR_PRESENTER pPresenter, PCR_PRESENTER_ENTRY pEntry, PCR_BLITTER pBlitter); 305 int CrPtEntryRegionsAdd(PCR_PRESENTER pPresenter, PCR_PRESENTER_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions); 306 int CrPtEntryRegionsSet(PCR_PRESENTER pPresenter, PCR_PRESENTER_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions); 301 307 int CrPtEntryRemove(PCR_PRESENTER pPresenter, PCR_PRESENTER_ENTRY pEntry); 302 308 int CrPtInit(PCR_PRESENTER pPresenter, PFNCRDISPLAY_REGIONS_CHANGED pfnRegionsChanged, PFNCRDISPLAY_DRAW_ENTRY pfnDrawEntry, PFNCRDISPLAY_DRAW_TEXTURE pfnDrawTexture); … … 318 324 CR_PRESENTER Presenter; 319 325 CRMuralInfo Mural; 320 CRCreateInfo_t MuralCreateInfo;321 326 PCR_BLITTER pBlitter; 322 327 } CR_DISPLAY, *PCR_DISPLAY; … … 328 333 pDisplay->pBlitter = pBlitter; 329 334 } 330 bool CrDpBlitterTest(PCR_DISPLAY pDisplay, PCR_BLITTER pBlitter); 335 int CrDpBlitterTestWithMural(PCR_BLITTER pBlitter, CRMuralInfo *pMural); 336 int CrDpBlitterTest(PCR_DISPLAY pDisplay, PCR_BLITTER pBlitter); 331 337 void CrDpResize(PCR_DISPLAY pDisplay, uint32_t width, uint32_t height, 332 338 uint32_t stretchedWidth, uint32_t stretchedHeight); 333 339 void CrDpEntryInit(PCR_DISPLAY_ENTRY pEntry, PCR_BLITTER_TEXTURE pTextureData); 334 340 void CrDpEntryCleanup(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry); 335 int CrDpPresentTexture(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions); 341 int CrDpEntryRegionsSet(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions); 342 int CrDpEntryRegionsAdd(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions); 343 int CrDpPresentEntry(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry); 336 344 DECLINLINE(bool) CrDpEntryIsUsed(PCR_DISPLAY_ENTRY pEntry) 337 345 { … … 343 351 return &pDisplay->Mural; 344 352 } 345 346 DECLINLINE(CRCreateInfo_t*) CrDpGetMuralCreateInfo(PCR_DISPLAY pDisplay)347 {348 return &pDisplay->MuralCreateInfo;349 }350 351 353 352 354 typedef struct CR_DISPLAY_ENTRY_MAP … … 387 389 388 390 CRHashTable *muralTable; /**< hash table where all murals are stored */ 389 CRHashTable *pWindowCreateInfoTable; /**< hash table with windows creation info */390 391 391 392 int client_spu_id; … … 467 468 468 469 PFNCRSERVERPRESENTFBO pfnPresentFBO; 469 GL booleanbForceOffscreenRendering; /*Force server to render 3d data offscreen470 GLubyte bForceOffscreenRendering; /*Force server to render 3d data offscreen 470 471 *using callback above to update vbox framebuffers*/ 472 GLubyte bOffscreenRenderingDefault; /*can be set with CR_SERVER_DEFAULT_RENDER_TYPE*/ 471 473 GLboolean bUsePBOForReadback; /*Use PBO's for data readback*/ 472 474 … … 476 478 GLboolean bUseMultipleContexts; 477 479 478 uint8_t fPresentBlitterInited; 480 /* @todo: should we use just one blitter? 481 * we use two currently because the drawable attribs can differ*/ 482 int8_t fPresentBlitterInited; 483 int8_t fFBOModeBlitterInited; 479 484 CR_DISPLAY_ENTRY_MAP PresentTexturepMap; 480 485 CR_BLITTER PresentBlitter; 486 CR_BLITTER FBOModeBlitter; 481 487 uint32_t DisplaysInitMap[(CR_MAX_GUEST_MONITORS + 31)/32]; 482 488 CR_DISPLAY aDispplays[CR_MAX_GUEST_MONITORS];
Note:
See TracChangeset
for help on using the changeset viewer.