Changeset 98693 in vbox
- Timestamp:
- Feb 22, 2023 5:33:07 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp
r98103 r98693 1147 1147 1148 1148 uint32_t const cbDst = pScreen->cHeight * pScreen->cbPitch; 1149 uint32_t cbScreenPixel = RT_ALIGN(pScreen->cBpp, 8) / 8; 1149 1150 uint8_t *pu8Dst; 1150 1151 if (pScreen->pvScreenBitmap) … … 1186 1187 + ((box.y + pSurface->cyBlock - 1) / pSurface->cyBlock) * pSurface->cyBlock * srcMap.cbRowPitch; 1187 1188 1188 /* The 'box' is actually in the destination coordinates relative to the top-left corner of destRect.1189 * The refore it is relative to the top-left corner of srcRect as well.1189 /* The 'box' is in coordinates relative to the top-left dstRect or srcRect corner. 1190 * The 'dstBoxAbs' and 'srcBoxAbs' are absolute coordinates of 'box' within screen object or texture face (respectively). 1190 1191 */ 1191 box.x += srcBox.x; 1192 box.y += srcBox.y; 1192 SVGA3dBox srcBoxAbs = box, dstBoxAbs = box; 1193 1194 srcBoxAbs.x += srcBox.x; 1195 srcBoxAbs.y += srcBox.y; 1196 1197 dstBoxAbs.x += dstBox.x; 1198 dstBoxAbs.y += dstBox.y; 1199 1200 uint32_t offDst = pScreen->cbPitch * dstBoxAbs.y + cbScreenPixel * dstBoxAbs.x; 1193 1201 1194 1202 VMSGA3D_BOX_DIMENSIONS srcDims; 1195 rc = vmsvga3dGetBoxDimensions(pThisCC, &srcImage, & box, &srcDims);1203 rc = vmsvga3dGetBoxDimensions(pThisCC, &srcImage, &srcBoxAbs, &srcDims); 1196 1204 if (RT_SUCCESS(rc)) 1197 1205 { 1198 1206 AssertContinue(srcDims.cyBlocks > 0); 1199 1207 1200 ASSERT_GUEST_BREAK( srcDims.offBox<= cbDst1201 && pScreen->cbPitch * (srcDims.cyBlocks - 1) + srcDims.cbRow <= cbDst - srcDims.offBox);1208 ASSERT_GUEST_BREAK( offDst <= cbDst 1209 && pScreen->cbPitch * (srcDims.cyBlocks - 1) + srcDims.cbRow <= cbDst - offDst); 1202 1210 RT_UNTRUSTED_VALIDATED_FENCE(); 1203 1211 1204 uint8_t *pu8DstBox = pu8Dst + srcDims.offBox;1212 uint8_t *pu8DstBox = pu8Dst + offDst; 1205 1213 1206 1214 if ( pSurface->format == SVGA3D_R8G8B8A8_UNORM
Note:
See TracChangeset
for help on using the changeset viewer.