@@ -183,6 +183,8 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferPerRow(const Bl
183
183
184
184
const auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo ();
185
185
dispatchPreBlitCommand (linearStream, hwInfo);
186
+ auto bltCmd = GfxFamily::cmdInitXyCopyBlt;
187
+ appendColorDepth (blitProperties, bltCmd);
186
188
187
189
for (uint64_t slice = 0 ; slice < blitProperties.copySize .z ; slice++) {
188
190
for (uint64_t row = 0 ; row < blitProperties.copySize .y ; row++) {
@@ -199,29 +201,24 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferPerRow(const Bl
199
201
height = 1 ;
200
202
}
201
203
202
- {
203
- auto bltCmd = GfxFamily::cmdInitXyCopyBlt;
204
-
205
- bltCmd.setDestinationX2CoordinateRight (static_cast <uint32_t >(width));
206
- bltCmd.setDestinationY2CoordinateBottom (static_cast <uint32_t >(height));
207
- bltCmd.setDestinationPitch (static_cast <uint32_t >(width));
208
- bltCmd.setSourcePitch (static_cast <uint32_t >(width));
204
+ bltCmd.setDestinationX2CoordinateRight (static_cast <uint32_t >(width));
205
+ bltCmd.setDestinationY2CoordinateBottom (static_cast <uint32_t >(height));
206
+ bltCmd.setDestinationPitch (static_cast <uint32_t >(width));
207
+ bltCmd.setSourcePitch (static_cast <uint32_t >(width));
209
208
210
- auto dstAddr = calculateBlitCommandDestinationBaseAddress (blitProperties, offset, row, slice);
211
- auto srcAddr = calculateBlitCommandSourceBaseAddress (blitProperties, offset, row, slice);
209
+ auto dstAddr = calculateBlitCommandDestinationBaseAddress (blitProperties, offset, row, slice);
210
+ auto srcAddr = calculateBlitCommandSourceBaseAddress (blitProperties, offset, row, slice);
212
211
213
- PRINT_DEBUG_STRING (DebugManager.flags .PrintBlitDispatchDetails .get (), stdout,
214
- " \n Blit command. width: %u, height: %u, srcAddr: %#llx, dstAddr: %#llx " , width, height, srcAddr, dstAddr);
212
+ PRINT_DEBUG_STRING (DebugManager.flags .PrintBlitDispatchDetails .get (), stdout,
213
+ " \n Blit command. width: %u, height: %u, srcAddr: %#llx, dstAddr: %#llx " , width, height, srcAddr, dstAddr);
215
214
216
- bltCmd.setDestinationBaseAddress (dstAddr);
217
- bltCmd.setSourceBaseAddress (srcAddr);
215
+ bltCmd.setDestinationBaseAddress (dstAddr);
216
+ bltCmd.setSourceBaseAddress (srcAddr);
218
217
219
- appendBlitCommandsForBuffer (blitProperties, bltCmd, rootDeviceEnvironment);
220
- appendColorDepth (blitProperties, bltCmd);
218
+ appendBlitCommandsForBuffer (blitProperties, bltCmd, rootDeviceEnvironment);
221
219
222
- auto bltStream = linearStream.getSpaceForCmd <typename GfxFamily::XY_COPY_BLT>();
223
- *bltStream = bltCmd;
224
- }
220
+ auto bltStream = linearStream.getSpaceForCmd <typename GfxFamily::XY_COPY_BLT>();
221
+ *bltStream = bltCmd;
225
222
226
223
dispatchPostBlitCommand (linearStream, hwInfo);
227
224
@@ -382,6 +379,11 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferRegion(const Bl
382
379
const auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo ();
383
380
dispatchPreBlitCommand (linearStream, hwInfo);
384
381
382
+ auto bltCmd = GfxFamily::cmdInitXyCopyBlt;
383
+ bltCmd.setSourcePitch (static_cast <uint32_t >(blitProperties.srcRowPitch ));
384
+ bltCmd.setDestinationPitch (static_cast <uint32_t >(blitProperties.dstRowPitch ));
385
+ appendColorDepth (blitProperties, bltCmd);
386
+
385
387
for (size_t slice = 0u ; slice < blitProperties.copySize .z ; ++slice) {
386
388
auto srcAddress = calculateBlitCommandSourceBaseAddressCopyRegion (blitProperties, slice);
387
389
auto dstAddress = calculateBlitCommandDestinationBaseAddressCopyRegion (blitProperties, slice);
@@ -393,17 +395,13 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferRegion(const Bl
393
395
394
396
while (widthToCopy > 0 ) {
395
397
auto width = static_cast <uint32_t >(std::min (widthToCopy, static_cast <size_t >(maxWidthToCopy)));
396
- auto bltCmd = GfxFamily::cmdInitXyCopyBlt;
397
398
398
399
bltCmd.setSourceBaseAddress (srcAddress);
399
400
bltCmd.setDestinationBaseAddress (dstAddress);
400
401
bltCmd.setDestinationX2CoordinateRight (width);
401
402
bltCmd.setDestinationY2CoordinateBottom (height);
402
- bltCmd.setSourcePitch (static_cast <uint32_t >(blitProperties.srcRowPitch ));
403
- bltCmd.setDestinationPitch (static_cast <uint32_t >(blitProperties.dstRowPitch ));
404
403
405
404
appendBlitCommandsForBuffer (blitProperties, bltCmd, rootDeviceEnvironment);
406
- appendColorDepth (blitProperties, bltCmd);
407
405
408
406
auto cmd = linearStream.getSpaceForCmd <typename GfxFamily::XY_COPY_BLT>();
409
407
*cmd = bltCmd;
0 commit comments