Changeset 82127 in vbox
- Timestamp:
- Nov 23, 2019 8:45:29 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134937
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r82117 r82127 3380 3380 3381 3381 3382 /* 3383 * These two macros are put outside vmsvgaR3FifoLoop because doxygen gets confused, 3384 * even the latest version, and thinks we're documenting vmsvgaR3FifoLoop. Sigh. 3385 */ 3386 /** @def VMSVGAFIFO_GET_CMD_BUFFER_BREAK 3387 * Macro for shortening calls to vmsvgaR3FifoGetCmdPayload. 3388 * 3389 * Will break out of the switch on failure. 3390 * Will restart and quit the loop if the thread was requested to stop. 3391 * 3392 * @param a_PtrVar Request variable pointer. 3393 * @param a_Type Request typedef (not pointer) for casting. 3394 * @param a_cbPayloadReq How much payload to fetch. 3395 * @remarks Accesses a bunch of variables in the current scope! 3396 */ 3397 # define VMSVGAFIFO_GET_CMD_BUFFER_BREAK(a_PtrVar, a_Type, a_cbPayloadReq) \ 3398 if (1) { \ 3399 (a_PtrVar) = (a_Type *)vmsvgaR3FifoGetCmdPayload((a_cbPayloadReq), pFIFO, offCurrentCmd, offFifoMin, offFifoMax, \ 3400 pbBounceBuf, &cbPayload, pThread, pThis, pSVGAState, pDevIns); \ 3401 if (RT_UNLIKELY((uintptr_t)(a_PtrVar) < 2)) { if ((uintptr_t)(a_PtrVar) == 1) continue; break; } \ 3402 RT_UNTRUSTED_NONVOLATILE_COPY_FENCE(); \ 3403 } else do {} while (0) 3404 /* @def VMSVGAFIFO_GET_MORE_CMD_BUFFER_BREAK 3405 * Macro for shortening calls to vmsvgaR3FifoGetCmdPayload for refetching the 3406 * buffer after figuring out the actual command size. 3407 * 3408 * Will break out of the switch on failure. 3409 * 3410 * @param a_PtrVar Request variable pointer. 3411 * @param a_Type Request typedef (not pointer) for casting. 3412 * @param a_cbPayloadReq How much payload to fetch. 3413 * @remarks Accesses a bunch of variables in the current scope! 3414 */ 3415 # define VMSVGAFIFO_GET_MORE_CMD_BUFFER_BREAK(a_PtrVar, a_Type, a_cbPayloadReq) \ 3416 if (1) { \ 3417 VMSVGAFIFO_GET_CMD_BUFFER_BREAK(a_PtrVar, a_Type, a_cbPayloadReq); \ 3418 } else do {} while (0) 3419 3382 3420 /** 3383 3421 * @callback_method_impl{PFNPDMTHREADDEV, The async FIFO handling thread.} … … 3596 3634 } 3597 3635 3598 /** @def VMSVGAFIFO_GET_CMD_BUFFER_BREAK3599 * Macro for shortening calls to vmsvgaR3FifoGetCmdPayload.3600 *3601 * Will break out of the switch on failure.3602 * Will restart and quit the loop if the thread was requested to stop.3603 *3604 * @param a_PtrVar Request variable pointer.3605 * @param a_Type Request typedef (not pointer) for casting.3606 * @param a_cbPayloadReq How much payload to fetch.3607 * @remarks Accesses a bunch of variables in the current scope!3608 */3609 # define VMSVGAFIFO_GET_CMD_BUFFER_BREAK(a_PtrVar, a_Type, a_cbPayloadReq) \3610 if (1) { \3611 (a_PtrVar) = (a_Type *)vmsvgaR3FifoGetCmdPayload((a_cbPayloadReq), pFIFO, offCurrentCmd, offFifoMin, offFifoMax, \3612 pbBounceBuf, &cbPayload, pThread, pThis, pSVGAState, pDevIns); \3613 if (RT_UNLIKELY((uintptr_t)(a_PtrVar) < 2)) { if ((uintptr_t)(a_PtrVar) == 1) continue; break; } \3614 RT_UNTRUSTED_NONVOLATILE_COPY_FENCE(); \3615 } else do {} while (0)3616 /** @def VMSVGAFIFO_GET_MORE_CMD_BUFFER_BREAK3617 * Macro for shortening calls to vmsvgaR3FifoGetCmdPayload for refetching the3618 * buffer after figuring out the actual command size.3619 *3620 * Will break out of the switch on failure.3621 *3622 * @param a_PtrVar Request variable pointer.3623 * @param a_Type Request typedef (not pointer) for casting.3624 * @param a_cbPayloadReq How much payload to fetch.3625 * @remarks Accesses a bunch of variables in the current scope!3626 */3627 # define VMSVGAFIFO_GET_MORE_CMD_BUFFER_BREAK(a_PtrVar, a_Type, a_cbPayloadReq) \3628 if (1) { \3629 VMSVGAFIFO_GET_CMD_BUFFER_BREAK(a_PtrVar, a_Type, a_cbPayloadReq); \3630 } else do {} while (0)3631 3632 3636 /* 3633 3637 * Mark the FIFO as busy. … … 4330 4334 } 4331 4335 4332 /** 4336 /** @def VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK 4333 4337 * Check that the 3D command has at least a_cbMin of payload bytes after the 4334 4338 * header. Will break out of the switch if it doesn't. … … 4784 4788 return VINF_SUCCESS; 4785 4789 } 4790 4791 #undef VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK 4792 #undef VMSVGAFIFO_GET_MORE_CMD_BUFFER_BREAK 4793 #undef VMSVGAFIFO_GET_CMD_BUFFER_BREAK 4786 4794 4787 4795 /**
Note:
See TracChangeset
for help on using the changeset viewer.