儲存庫 vbox 的更動 63242
- 時間撮記:
- 2016-8-10 上午10:12:45 (8 年 以前)
- 位置:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVbva.cpp
r63062 r63242 1 1 /* $Id$ */ 2 3 2 /** @file 4 3 * VBox WDDM Miniport driver … … 235 234 * Public hardware buffer methods. 236 235 */ 237 RTDECL(int) VBoxVBVAExEnable(PVBVAEXBUFFERCONTEXT pCtx, 238 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, 239 VBVABUFFER *pVBVA) 236 VBVAEX_DECL(int) VBoxVBVAExEnable(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, VBVABUFFER *pVBVA) 240 237 { 241 238 int rc = VERR_GENERAL_FAILURE; … … 275 272 } 276 273 277 RTDECL(void) VBoxVBVAExDisable(PVBVAEXBUFFERCONTEXT pCtx, 278 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx) 274 VBVAEX_DECL(void) VBoxVBVAExDisable(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx) 279 275 { 280 276 LogFlowFunc(("\n")); … … 289 285 } 290 286 291 RTDECL(bool) VBoxVBVAExBufferBeginUpdate(PVBVAEXBUFFERCONTEXT pCtx, 292 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx) 287 VBVAEX_DECL(bool) VBoxVBVAExBufferBeginUpdate(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx) 293 288 { 294 289 bool bRc = false; … … 342 337 } 343 338 344 RTDECL(void) VBoxVBVAExBufferEndUpdate(PVBVAEXBUFFERCONTEXT pCtx)339 VBVAEX_DECL(void) VBoxVBVAExBufferEndUpdate(PVBVAEXBUFFERCONTEXT pCtx) 345 340 { 346 341 VBVARECORD *pRecord; … … 513 508 * Public writer to the hardware buffer. 514 509 */ 515 RTDECL(uint32_t) VBoxVBVAExGetFreeTail(PVBVAEXBUFFERCONTEXT pCtx)510 VBVAEX_DECL(uint32_t) VBoxVBVAExGetFreeTail(PVBVAEXBUFFERCONTEXT pCtx) 516 511 { 517 512 VBVABUFFER *pVBVA = pCtx->pVBVA; … … 521 516 } 522 517 523 RTDECL(void*) VBoxVBVAExAllocContiguous(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, uint32_t cb)518 VBVAEX_DECL(void *) VBoxVBVAExAllocContiguous(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, uint32_t cb) 524 519 { 525 520 VBVARECORD *pRecord; … … 578 573 } 579 574 580 RTDECL(bool) VBoxVBVAExIsProcessing(PVBVAEXBUFFERCONTEXT pCtx)575 VBVAEX_DECL(bool) VBoxVBVAExIsProcessing(PVBVAEXBUFFERCONTEXT pCtx) 581 576 { 582 577 uint32_t u32HostEvents = pCtx->pVBVA->hostFlags.u32HostEvents; … … 584 579 } 585 580 586 RTDECL(void) VBoxVBVAExCBufferCompleted(PVBVAEXBUFFERCONTEXT pCtx)581 VBVAEX_DECL(void) VBoxVBVAExCBufferCompleted(PVBVAEXBUFFERCONTEXT pCtx) 587 582 { 588 583 VBVABUFFER *pVBVA = pCtx->pVBVA; … … 592 587 } 593 588 594 RTDECL(bool) VBoxVBVAExWrite(PVBVAEXBUFFERCONTEXT pCtx, 595 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, 596 const void *pv, uint32_t cb) 589 VBVAEX_DECL(bool) VBoxVBVAExWrite(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, const void *pv, uint32_t cb) 597 590 { 598 591 return vboxHwBufferWrite(pCtx, pHGSMICtx, pv, cb); 599 592 } 600 593 601 RTDECL(bool) VBoxVBVAExOrderSupported(PVBVAEXBUFFERCONTEXT pCtx, unsigned code)594 VBVAEX_DECL(bool) VBoxVBVAExOrderSupported(PVBVAEXBUFFERCONTEXT pCtx, unsigned code) 602 595 { 603 596 VBVABUFFER *pVBVA = pCtx->pVBVA; … … 616 609 } 617 610 618 RTDECL(void) VBoxVBVAExSetupBufferContext(PVBVAEXBUFFERCONTEXT pCtx, 619 uint32_t offVRAMBuffer, 620 uint32_t cbBuffer, 621 PFNVBVAEXBUFFERFLUSH pfnFlush, 622 void *pvFlush) 611 VBVAEX_DECL(void) VBoxVBVAExSetupBufferContext(PVBVAEXBUFFERCONTEXT pCtx, uint32_t offVRAMBuffer, uint32_t cbBuffer, 612 PFNVBVAEXBUFFERFLUSH pfnFlush, void *pvFlush) 623 613 { 624 614 memset(pCtx, 0, RT_OFFSETOF(VBVAEXBUFFERCONTEXT, pVBVA)); … … 647 637 } 648 638 649 RTDECL(void) VBoxVBVAExBIterInit(PVBVAEXBUFFERCONTEXT pCtx, PVBVAEXBUFFERBACKWARDITER pIter)639 VBVAEX_DECL(void) VBoxVBVAExBIterInit(PVBVAEXBUFFERCONTEXT pCtx, PVBVAEXBUFFERBACKWARDITER pIter) 650 640 { 651 641 struct VBVABUFFER *pVBVA = pCtx->pVBVA; … … 668 658 } 669 659 670 RTDECL(void*) VBoxVBVAExBIterNext(PVBVAEXBUFFERBACKWARDITER pIter, uint32_t *pcbBuffer, bool *pfProcessed)660 VBVAEX_DECL(void *) VBoxVBVAExBIterNext(PVBVAEXBUFFERBACKWARDITER pIter, uint32_t *pcbBuffer, bool *pfProcessed) 671 661 { 672 662 PVBVAEXBUFFERCONTEXT pCtx = pIter->Base.pCtx; … … 688 678 } 689 679 690 RTDECL(void) VBoxVBVAExCFIterInit(PVBVAEXBUFFERCONTEXT pCtx, PVBVAEXBUFFERFORWARDITER pIter)680 VBVAEX_DECL(void) VBoxVBVAExCFIterInit(PVBVAEXBUFFERCONTEXT pCtx, PVBVAEXBUFFERFORWARDITER pIter) 691 681 { 692 682 pIter->Base.pCtx = pCtx; … … 695 685 } 696 686 697 RTDECL(void*) VBoxVBVAExCFIterNext(PVBVAEXBUFFERFORWARDITER pIter, uint32_t *pcbBuffer, bool *pfProcessed)687 VBVAEX_DECL(void *) VBoxVBVAExCFIterNext(PVBVAEXBUFFERFORWARDITER pIter, uint32_t *pcbBuffer, bool *pfProcessed) 698 688 { 699 689 PVBVAEXBUFFERCONTEXT pCtx = pIter->Base.pCtx; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVbva.h
r63039 r63242 144 144 /** @name VBVAEx APIs 145 145 * @{ */ 146 RTDECL(int) VBoxVBVAExEnable(PVBVAEXBUFFERCONTEXT pCtx, 147 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, 148 struct VBVABUFFER *pVBVA); 149 RTDECL(void) VBoxVBVAExDisable(PVBVAEXBUFFERCONTEXT pCtx, 150 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx); 151 RTDECL(bool) VBoxVBVAExBufferBeginUpdate(PVBVAEXBUFFERCONTEXT pCtx, 152 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx); 153 RTDECL(void) VBoxVBVAExBufferEndUpdate(PVBVAEXBUFFERCONTEXT pCtx); 154 RTDECL(bool) VBoxVBVAExWrite(PVBVAEXBUFFERCONTEXT pCtx, 155 PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, 156 const void *pv, uint32_t cb); 157 158 RTDECL(bool) VBoxVBVAExOrderSupported(PVBVAEXBUFFERCONTEXT pCtx, unsigned code); 159 160 RTDECL(void) VBoxVBVAExSetupBufferContext(PVBVAEXBUFFERCONTEXT pCtx, 161 uint32_t offVRAMBuffer, 162 uint32_t cbBuffer, 163 PFNVBVAEXBUFFERFLUSH pfnFlush, 164 void *pvFlush); 146 #define VBVAEX_DECL(type) type VBOXCALL 147 VBVAEX_DECL(int) VBoxVBVAExEnable(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, struct VBVABUFFER *pVBVA); 148 VBVAEX_DECL(void) VBoxVBVAExDisable(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx); 149 VBVAEX_DECL(bool) VBoxVBVAExBufferBeginUpdate(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx); 150 VBVAEX_DECL(void) VBoxVBVAExBufferEndUpdate(PVBVAEXBUFFERCONTEXT pCtx); 151 VBVAEX_DECL(bool) VBoxVBVAExWrite(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, const void *pv, uint32_t cb); 152 153 VBVAEX_DECL(bool) VBoxVBVAExOrderSupported(PVBVAEXBUFFERCONTEXT pCtx, unsigned code); 154 155 VBVAEX_DECL(void) VBoxVBVAExSetupBufferContext(PVBVAEXBUFFERCONTEXT pCtx, uint32_t offVRAMBuffer, uint32_t cbBuffer, 156 PFNVBVAEXBUFFERFLUSH pfnFlush, void *pvFlush); 165 157 166 158 DECLINLINE(uint32_t) VBoxVBVAExGetSize(PVBVAEXBUFFERCONTEXT pCtx) … … 169 161 } 170 162 171 /* can be used to ensure the command will not cross the ring buffer boundary,163 /** can be used to ensure the command will not cross the ring buffer boundary, 172 164 * and thus will not be splitted */ 173 RTDECL(uint32_t) VBoxVBVAExGetFreeTail(PVBVAEXBUFFERCONTEXT pCtx);174 /* allocates a contiguous buffer of a given size, i.e. the one that is not splitted across ringbuffer boundaries */175 RTDECL(void*) VBoxVBVAExAllocContiguous(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, uint32_t cb);176 /* answers whether host is in "processing" state now,165 VBVAEX_DECL(uint32_t) VBoxVBVAExGetFreeTail(PVBVAEXBUFFERCONTEXT pCtx); 166 /** allocates a contiguous buffer of a given size, i.e. the one that is not splitted across ringbuffer boundaries */ 167 VBVAEX_DECL(void *) VBoxVBVAExAllocContiguous(PVBVAEXBUFFERCONTEXT pCtx, PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, uint32_t cb); 168 /** answers whether host is in "processing" state now, 177 169 * i.e. if "processing" is true after the command is submitted, no notification is required to be posted to host to make the commandbe processed, 178 170 * otherwise, host should be notified about the command */ 179 RTDECL(bool) VBoxVBVAExIsProcessing(PVBVAEXBUFFERCONTEXT pCtx);180 181 /* initializes iterator that starts with free record,171 VBVAEX_DECL(bool) VBoxVBVAExIsProcessing(PVBVAEXBUFFERCONTEXT pCtx); 172 173 /** initializes iterator that starts with free record, 182 174 * i.e. VBoxVBVAExIterNext would return the first uncompleted record. 183 175 * 184 176 * can be used by submitter only */ 185 RTDECL(void) VBoxVBVAExBIterInit(PVBVAEXBUFFERCONTEXT pCtx, PVBVAEXBUFFERBACKWARDITER pIter);186 /* can be used by submitter only */187 RTDECL(void*) VBoxVBVAExBIterNext(PVBVAEXBUFFERBACKWARDITER pIter, uint32_t *pcbBuffer, bool *pfProcessed);177 VBVAEX_DECL(void) VBoxVBVAExBIterInit(PVBVAEXBUFFERCONTEXT pCtx, PVBVAEXBUFFERBACKWARDITER pIter); 178 /** can be used by submitter only */ 179 VBVAEX_DECL(void *) VBoxVBVAExBIterNext(PVBVAEXBUFFERBACKWARDITER pIter, uint32_t *pcbBuffer, bool *pfProcessed); 188 180 189 181 /* completer functions … … 191 183 * Completter functions are prefixed with VBoxVBVAExC as opposed to submitter ones, 192 184 * that do not have the last "C" in the prefix */ 193 /* initializes iterator that starts with completed record,185 /** initializes iterator that starts with completed record, 194 186 * i.e. VBoxVBVAExIterPrev would return the first uncompleted record. 195 187 * note that we can not have iterator that starts at processed record … … 198 190 * and so we may end up with inconsistent index-offData pair 199 191 * 200 * can be used by completter only */ 201 RTDECL(void) VBoxVBVAExCFIterInit(PVBVAEXBUFFERCONTEXT pCtx, PVBVAEXBUFFERFORWARDITER pIter); 202 /* can be used by completter only */ 203 RTDECL(void*) VBoxVBVAExCFIterNext(PVBVAEXBUFFERFORWARDITER pIter, uint32_t *pcbBuffer, bool *pfProcessed); 204 205 RTDECL(void) VBoxVBVAExCBufferCompleted(PVBVAEXBUFFERCONTEXT pCtx); 206 192 * can be used by completer only */ 193 VBVAEX_DECL(void) VBoxVBVAExCFIterInit(PVBVAEXBUFFERCONTEXT pCtx, PVBVAEXBUFFERFORWARDITER pIter); 194 /** can be used by completer only */ 195 VBVAEX_DECL(void *) VBoxVBVAExCFIterNext(PVBVAEXBUFFERFORWARDITER pIter, uint32_t *pcbBuffer, bool *pfProcessed); 196 197 VBVAEX_DECL(void) VBoxVBVAExCBufferCompleted(PVBVAEXBUFFERCONTEXT pCtx); 207 198 /** @} */ 208 199
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器