mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Add check in XY_BLOCK_COPY_BLT surface width, height & depth setters
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5ae968f2fd
commit
6658768149
@@ -562,6 +562,8 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandAndRe
|
||||
XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenDebugFlagSetWhenCompressionIsUsedThenForceCompressionEnableFields) {
|
||||
using XY_COPY_BLT = typename FamilyType::XY_COPY_BLT;
|
||||
auto blitCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
blitCmd.setDestinationX2CoordinateRight(1);
|
||||
blitCmd.setDestinationY2CoordinateBottom(1);
|
||||
|
||||
auto gmm = std::make_unique<MockGmm>(clDevice->getGmmClientContext());
|
||||
gmm->isCompressionEnabled = true;
|
||||
@@ -604,6 +606,8 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenDebugFlagForClearColorNotSetWhenProg
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.UseClearColorAllocationForBlitter.set(false);
|
||||
auto blitCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
blitCmd.setDestinationX2CoordinateRight(1);
|
||||
blitCmd.setDestinationY2CoordinateBottom(1);
|
||||
|
||||
MockGraphicsAllocation mockAllocation;
|
||||
BlitProperties properties = {};
|
||||
@@ -627,6 +631,8 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenDebugFlagForClearColorSetWhenProgram
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.UseClearColorAllocationForBlitter.set(true);
|
||||
auto blitCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
blitCmd.setDestinationX2CoordinateRight(1);
|
||||
blitCmd.setDestinationY2CoordinateBottom(1);
|
||||
|
||||
MockGraphicsAllocation mockAllocation;
|
||||
BlitProperties properties = {};
|
||||
@@ -656,6 +662,8 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenDebugFlagForClearColorNotSetWhenProg
|
||||
|
||||
MockGraphicsAllocation mockAllocation;
|
||||
BlitProperties properties = {};
|
||||
properties.srcSize = {1, 1, 1};
|
||||
properties.dstSize = {1, 1, 1};
|
||||
properties.srcAllocation = &mockAllocation;
|
||||
properties.dstAllocation = &mockAllocation;
|
||||
properties.clearColorAllocation = &mockAllocation;
|
||||
@@ -681,6 +689,8 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenDebugFlagForClearColorSetWhenProgram
|
||||
|
||||
MockGraphicsAllocation mockAllocation;
|
||||
BlitProperties properties = {};
|
||||
properties.srcSize = {1, 1, 1};
|
||||
properties.dstSize = {1, 1, 1};
|
||||
properties.srcAllocation = &mockAllocation;
|
||||
properties.dstAllocation = &mockAllocation;
|
||||
properties.clearColorAllocation = &mockAllocation;
|
||||
|
||||
@@ -3838,6 +3838,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setDestinationSurfaceHeight(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.DestinationSurfaceHeight = value - 1;
|
||||
}
|
||||
|
||||
@@ -3846,6 +3847,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setDestinationSurfaceWidth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.DestinationSurfaceWidth = value - 1;
|
||||
}
|
||||
|
||||
@@ -3878,6 +3880,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setDestinationSurfaceDepth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x7ff);
|
||||
TheStructure.Common.DestinationSurfaceDepth = value - 1;
|
||||
}
|
||||
|
||||
@@ -3934,6 +3937,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setSourceSurfaceHeight(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.SourceSurfaceHeight = value - 1;
|
||||
}
|
||||
|
||||
@@ -3942,6 +3946,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setSourceSurfaceWidth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.SourceSurfaceWidth = value - 1;
|
||||
}
|
||||
|
||||
@@ -3974,6 +3979,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setSourceSurfaceDepth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x7ff);
|
||||
TheStructure.Common.SourceSurfaceDepth = value - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -4115,6 +4115,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setDestinationSurfaceHeight(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.DestinationSurfaceHeight = value - 1;
|
||||
}
|
||||
|
||||
@@ -4123,6 +4124,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setDestinationSurfaceWidth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.DestinationSurfaceWidth = value - 1;
|
||||
}
|
||||
|
||||
@@ -4155,11 +4157,12 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setDestinationSurfaceDepth(const uint32_t value) {
|
||||
TheStructure.Common.DestinationSurfaceDepth = value;
|
||||
UNRECOVERABLE_IF(value - 1 > 0x7ff);
|
||||
TheStructure.Common.DestinationSurfaceDepth = value - 1;
|
||||
}
|
||||
|
||||
inline uint32_t getDestinationSurfaceDepth() const {
|
||||
return (TheStructure.Common.DestinationSurfaceDepth);
|
||||
return (TheStructure.Common.DestinationSurfaceDepth + 1);
|
||||
}
|
||||
|
||||
inline void setDestinationHorizontalAlign(const uint32_t value) {
|
||||
@@ -4211,6 +4214,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setSourceSurfaceHeight(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.SourceSurfaceHeight = value - 1;
|
||||
}
|
||||
|
||||
@@ -4219,6 +4223,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setSourceSurfaceWidth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.SourceSurfaceWidth = value - 1;
|
||||
}
|
||||
|
||||
@@ -4251,6 +4256,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setSourceSurfaceDepth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x7ff);
|
||||
TheStructure.Common.SourceSurfaceDepth = value - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -3872,6 +3872,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setDestinationSurfaceHeight(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.DestinationSurfaceHeight = value - 1;
|
||||
}
|
||||
|
||||
@@ -3880,6 +3881,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setDestinationSurfaceWidth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.DestinationSurfaceWidth = value - 1;
|
||||
}
|
||||
|
||||
@@ -3912,6 +3914,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setDestinationSurfaceDepth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x7ff);
|
||||
TheStructure.Common.DestinationSurfaceDepth = value - 1;
|
||||
}
|
||||
|
||||
@@ -3968,6 +3971,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setSourceSurfaceHeight(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.SourceSurfaceHeight = value - 1;
|
||||
}
|
||||
|
||||
@@ -3976,6 +3980,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setSourceSurfaceWidth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x3fff);
|
||||
TheStructure.Common.SourceSurfaceWidth = value - 1;
|
||||
}
|
||||
|
||||
@@ -4008,6 +4013,7 @@ struct XY_BLOCK_COPY_BLT {
|
||||
}
|
||||
|
||||
inline void setSourceSurfaceDepth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value - 1 > 0x7ff);
|
||||
TheStructure.Common.SourceSurfaceDepth = value - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -431,6 +431,8 @@ HWTEST2_F(BlitTests, givenTiled4SrcAndDestinationAppendImageCommandsThenCorrectT
|
||||
mockAllocationDst.setGmm(gmm.get(), 0);
|
||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
BlitProperties properties = {};
|
||||
properties.srcSize = {1, 1, 1};
|
||||
properties.dstSize = {1, 1, 1};
|
||||
properties.srcAllocation = &mockAllocationSrc;
|
||||
properties.dstAllocation = &mockAllocationDst;
|
||||
properties.clearColorAllocation = &mockClearColor;
|
||||
@@ -457,6 +459,8 @@ HWTEST2_F(BlitTests, givenNotTiled64SrcAndDestinationAppendImageCommandsThenCorr
|
||||
mockAllocationDst.setGmm(gmm.get(), 0);
|
||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
BlitProperties properties = {};
|
||||
properties.srcSize = {1, 1, 1};
|
||||
properties.dstSize = {1, 1, 1};
|
||||
properties.srcAllocation = &mockAllocationSrc;
|
||||
properties.dstAllocation = &mockAllocationDst;
|
||||
properties.clearColorAllocation = &mockClearColor;
|
||||
@@ -483,6 +487,8 @@ HWTEST2_F(BlitTests, givenNotTiledSrcAndDestinationAppendImageCommandsThenCorrec
|
||||
mockAllocationDst.setGmm(gmm.get(), 0);
|
||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
BlitProperties properties = {};
|
||||
properties.srcSize = {1, 1, 1};
|
||||
properties.dstSize = {1, 1, 1};
|
||||
properties.srcAllocation = &mockAllocationSrc;
|
||||
properties.dstAllocation = &mockAllocationDst;
|
||||
properties.clearColorAllocation = &mockClearColor;
|
||||
@@ -665,6 +671,8 @@ HWTEST2_F(BlitTests, givenResourceWithoutGmmWhenAppendImageCommandsThenPitchEqua
|
||||
|
||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
BlitProperties properties = {};
|
||||
properties.srcSize = {1, 1, 1};
|
||||
properties.dstSize = {1, 1, 1};
|
||||
properties.dstRowPitch = 0x100;
|
||||
properties.srcRowPitch = 0x100;
|
||||
properties.srcAllocation = &mockAllocationSrc;
|
||||
@@ -731,6 +739,8 @@ HWTEST2_F(BlitTests, givenResourceInfoWithZeroPitchWhenAppendImageCommandsThenPi
|
||||
mockAllocationDst.setGmm(gmm.get(), 0);
|
||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
BlitProperties properties = {};
|
||||
properties.srcSize = {1, 1, 1};
|
||||
properties.dstSize = {1, 1, 1};
|
||||
properties.dstRowPitch = 0x100;
|
||||
properties.srcRowPitch = 0x100;
|
||||
|
||||
@@ -764,6 +774,8 @@ HWTEST2_F(BlitTests, givenTiledAllocationWhenAppendBlitCommandsForImagesThenBlit
|
||||
mockAllocationDst.setGmm(gmm.get(), 0);
|
||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
BlitProperties properties = {};
|
||||
properties.srcSize = {1, 1, 1};
|
||||
properties.dstSize = {1, 1, 1};
|
||||
properties.dstRowPitch = 0x1000;
|
||||
properties.srcRowPitch = 0x1000;
|
||||
|
||||
@@ -831,6 +843,8 @@ HWTEST2_F(BlitTests, givenLinearResourceInfoWithNotZeroPitchWhenAppendImageComma
|
||||
mockAllocationDst.setGmm(gmm.get(), 0);
|
||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
BlitProperties properties = {};
|
||||
properties.srcSize = {1, 1, 1};
|
||||
properties.dstSize = {1, 1, 1};
|
||||
properties.dstRowPitch = 0x1000;
|
||||
properties.srcRowPitch = 0x1000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user