Skip to content

Commit 6dddcbd

Browse files
Simplify block copy command interface
Change-Id: I9c89fdb05bc7734e29678fd396bb6f5bc58e919a Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
1 parent 5bed747 commit 6dddcbd

File tree

6 files changed

+22
-31
lines changed

6 files changed

+22
-31
lines changed

core/gen11/hw_cmds_generated.inl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4336,18 +4336,18 @@ typedef struct tagXY_SRC_COPY_BLT {
43364336
inline uint32_t getDestinationY1CoordinateTop(void) const {
43374337
return TheStructure.Common.DestinationY1Coordinate_Top;
43384338
}
4339-
inline void setDestinationX2CoordinateRight(const uint32_t value) {
4339+
inline void setTransferWidth(const uint32_t value) {
43404340
UNRECOVERABLE_IF(value > 0xffff);
43414341
TheStructure.Common.DestinationX2Coordinate_Right = value;
43424342
}
4343-
inline uint32_t getDestinationX2CoordinateRight(void) const {
4343+
inline uint32_t getTransferWidth(void) const {
43444344
return TheStructure.Common.DestinationX2Coordinate_Right;
43454345
}
4346-
inline void setDestinationY2CoordinateBottom(const uint32_t value) {
4346+
inline void setTransferHeight(const uint32_t value) {
43474347
UNRECOVERABLE_IF(value > 0xffff0000);
43484348
TheStructure.Common.DestinationY2Coordinate_Bottom = value;
43494349
}
4350-
inline uint32_t getDestinationY2CoordinateBottom(void) const {
4350+
inline uint32_t getTransferHeight(void) const {
43514351
return TheStructure.Common.DestinationY2Coordinate_Bottom;
43524352
}
43534353
inline void setDestinationBaseAddress(const uint64_t value) {

core/gen12lp/hw_cmds_generated.inl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4027,18 +4027,18 @@ typedef struct tagXY_SRC_COPY_BLT {
40274027
inline uint32_t getDestinationY1CoordinateTop(void) const {
40284028
return TheStructure.Common.DestinationY1Coordinate_Top;
40294029
}
4030-
inline void setDestinationX2CoordinateRight(const uint32_t value) {
4030+
inline void setTransferWidth(const uint32_t value) {
40314031
UNRECOVERABLE_IF(value > 0xffff);
40324032
TheStructure.Common.DestinationX2Coordinate_Right = value;
40334033
}
4034-
inline uint32_t getDestinationX2CoordinateRight(void) const {
4034+
inline uint32_t getTransferWidth(void) const {
40354035
return TheStructure.Common.DestinationX2Coordinate_Right;
40364036
}
4037-
inline void setDestinationY2CoordinateBottom(const uint32_t value) {
4037+
inline void setTransferHeight(const uint32_t value) {
40384038
UNRECOVERABLE_IF(value > 0xffff);
40394039
TheStructure.Common.DestinationY2Coordinate_Bottom = value;
40404040
}
4041-
inline uint32_t getDestinationY2CoordinateBottom(void) const {
4041+
inline uint32_t getTransferHeight(void) const {
40424042
return TheStructure.Common.DestinationY2Coordinate_Bottom;
40434043
}
40444044
inline void setDestinationBaseAddress(const uint64_t value) {

core/gen8/hw_cmds_generated.inl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4019,18 +4019,18 @@ typedef struct tagXY_SRC_COPY_BLT {
40194019
inline uint32_t getDestinationY1CoordinateTop(void) const {
40204020
return TheStructure.Common.DestinationY1Coordinate_Top;
40214021
}
4022-
inline void setDestinationX2CoordinateRight(const uint32_t value) {
4022+
inline void setTransferWidth(const uint32_t value) {
40234023
UNRECOVERABLE_IF(value > 0xffff);
40244024
TheStructure.Common.DestinationX2Coordinate_Right = value;
40254025
}
4026-
inline uint32_t getDestinationX2CoordinateRight(void) const {
4026+
inline uint32_t getTransferWidth(void) const {
40274027
return TheStructure.Common.DestinationX2Coordinate_Right;
40284028
}
4029-
inline void setDestinationY2CoordinateBottom(const uint32_t value) {
4029+
inline void setTransferHeight(const uint32_t value) {
40304030
UNRECOVERABLE_IF(value > 0xffff0000);
40314031
TheStructure.Common.DestinationY2Coordinate_Bottom = value;
40324032
}
4033-
inline uint32_t getDestinationY2CoordinateBottom(void) const {
4033+
inline uint32_t getTransferHeight(void) const {
40344034
return TheStructure.Common.DestinationY2Coordinate_Bottom;
40354035
}
40364036
inline void setDestinationBaseAddress(const uint64_t value) {

core/gen9/hw_cmds_generated.inl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4212,18 +4212,18 @@ typedef struct tagXY_SRC_COPY_BLT {
42124212
inline uint32_t getDestinationY1CoordinateTop(void) const {
42134213
return TheStructure.Common.DestinationY1Coordinate_Top;
42144214
}
4215-
inline void setDestinationX2CoordinateRight(const uint32_t value) {
4215+
inline void setTransferWidth(const uint32_t value) {
42164216
UNRECOVERABLE_IF(value > 0xffff);
42174217
TheStructure.Common.DestinationX2Coordinate_Right = value;
42184218
}
4219-
inline uint32_t getDestinationX2CoordinateRight(void) const {
4219+
inline uint32_t getTransferWidth(void) const {
42204220
return TheStructure.Common.DestinationX2Coordinate_Right;
42214221
}
4222-
inline void setDestinationY2CoordinateBottom(const uint32_t value) {
4222+
inline void setTransferHeight(const uint32_t value) {
42234223
UNRECOVERABLE_IF(value > 0xffff0000);
42244224
TheStructure.Common.DestinationY2Coordinate_Bottom = value;
42254225
}
4226-
inline uint32_t getDestinationY2CoordinateBottom(void) const {
4226+
inline uint32_t getTransferHeight(void) const {
42274227
return TheStructure.Common.DestinationY2Coordinate_Bottom;
42284228
}
42294229
inline void setDestinationBaseAddress(const uint64_t value) {

runtime/helpers/blit_commands_helper_base.inl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,8 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBuffer(const BlitProp
6868
auto bltCmd = linearStream.getSpaceForCmd<typename GfxFamily::XY_COPY_BLT>();
6969
*bltCmd = GfxFamily::cmdInitXyCopyBlt;
7070

71-
bltCmd->setDestinationX1CoordinateLeft(0);
72-
bltCmd->setDestinationY1CoordinateTop(0);
73-
bltCmd->setSourceX1CoordinateLeft(0);
74-
bltCmd->setSourceY1CoordinateTop(0);
75-
76-
bltCmd->setDestinationX2CoordinateRight(static_cast<uint32_t>(width));
77-
bltCmd->setDestinationY2CoordinateBottom(static_cast<uint32_t>(height));
71+
bltCmd->setTransferWidth(static_cast<uint32_t>(width));
72+
bltCmd->setTransferHeight(static_cast<uint32_t>(height));
7873

7974
bltCmd->setDestinationPitch(static_cast<uint32_t>(width));
8075
bltCmd->setSourcePitch(static_cast<uint32_t>(width));

unit_tests/command_stream/command_stream_receiver_hw_tests.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -436,18 +436,14 @@ HWTEST_F(BcsTests, givenBltSizeWithLeftoverWhenDispatchedThenProgramAllRequiredC
436436
auto bltCmd = genCmdCast<typename FamilyType::XY_COPY_BLT *>(*(cmdIterator++));
437437
EXPECT_NE(nullptr, bltCmd);
438438

439-
EXPECT_EQ(0u, bltCmd->getDestinationX1CoordinateLeft());
440-
EXPECT_EQ(0u, bltCmd->getDestinationY1CoordinateTop());
441-
EXPECT_EQ(0u, bltCmd->getSourceX1CoordinateLeft());
442-
EXPECT_EQ(0u, bltCmd->getSourceY1CoordinateTop());
443439
uint32_t expectedWidth = static_cast<uint32_t>(BlitterConstants::maxBlitWidth);
444440
uint32_t expectedHeight = static_cast<uint32_t>(BlitterConstants::maxBlitHeight);
445441
if (i == (numberOfBlts - 1)) {
446442
expectedWidth = bltLeftover;
447443
expectedHeight = 1;
448444
}
449-
EXPECT_EQ(expectedWidth, bltCmd->getDestinationX2CoordinateRight());
450-
EXPECT_EQ(expectedHeight, bltCmd->getDestinationY2CoordinateBottom());
445+
EXPECT_EQ(expectedWidth, bltCmd->getTransferWidth());
446+
EXPECT_EQ(expectedHeight, bltCmd->getTransferHeight());
451447
EXPECT_EQ(expectedWidth, bltCmd->getDestinationPitch());
452448
EXPECT_EQ(expectedWidth, bltCmd->getSourcePitch());
453449
}
@@ -1037,8 +1033,8 @@ HWTEST_F(BcsTests, givenAuxTranslationRequestWhenBlitCalledThenProgramCommandCor
10371033
for (auto &cmd : hwParser.cmdList) {
10381034
if (auto bltCmd = genCmdCast<typename FamilyType::XY_COPY_BLT *>(cmd)) {
10391035
xyCopyBltCmdFound++;
1040-
EXPECT_EQ(static_cast<uint32_t>(allocationSize), bltCmd->getDestinationX2CoordinateRight());
1041-
EXPECT_EQ(1u, bltCmd->getDestinationY2CoordinateBottom());
1036+
EXPECT_EQ(static_cast<uint32_t>(allocationSize), bltCmd->getTransferWidth());
1037+
EXPECT_EQ(1u, bltCmd->getTransferHeight());
10421038

10431039
EXPECT_EQ(allocationGpuAddress, bltCmd->getDestinationBaseAddress());
10441040
EXPECT_EQ(allocationGpuAddress, bltCmd->getSourceBaseAddress());

0 commit comments

Comments
 (0)