Use FAST_COLOR command instead of COLOR for tgllp
Change-Id: I9c94ecd9afb6030e96a75ecd0c882711d1c775de Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
parent
a3bb60e17c
commit
cf9d338178
|
@ -166,6 +166,32 @@ void BlitCommandsHelper<Family>::appendBlitCommandsForImages(const BlitPropertie
|
|||
appendTilingType(srcTileType, dstTileType, blitCmd);
|
||||
}
|
||||
|
||||
template <>
|
||||
void BlitCommandsHelper<Family>::dispatchBlitMemoryColorFill(NEO::GraphicsAllocation *dstAlloc, uint32_t *pattern, size_t patternSize, LinearStream &linearStream, size_t size, const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
switch (patternSize) {
|
||||
case 1:
|
||||
NEO::BlitCommandsHelper<Family>::dispatchBlitMemoryFill<1>(dstAlloc, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR);
|
||||
break;
|
||||
case 2:
|
||||
NEO::BlitCommandsHelper<Family>::dispatchBlitMemoryFill<2>(dstAlloc, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_16_BIT_COLOR);
|
||||
break;
|
||||
case 4:
|
||||
NEO::BlitCommandsHelper<Family>::dispatchBlitMemoryFill<4>(dstAlloc, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_32_BIT_COLOR);
|
||||
break;
|
||||
case 8:
|
||||
NEO::BlitCommandsHelper<Family>::dispatchBlitMemoryFill<8>(dstAlloc, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_64_BIT_COLOR);
|
||||
break;
|
||||
default:
|
||||
NEO::BlitCommandsHelper<Family>::dispatchBlitMemoryFill<16>(dstAlloc, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_128_BIT_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
void BlitCommandsHelper<Family>::appendBlitCommandsForFillBuffer(NEO::GraphicsAllocation *dstAlloc, typename Family::XY_COLOR_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
}
|
||||
template <>
|
||||
void BlitCommandsHelper<Family>::appendTilingEnable(typename Family::XY_COLOR_BLT &blitCmd) {}
|
||||
|
||||
template class CommandStreamReceiverHw<Family>;
|
||||
template struct BlitCommandsHelper<Family>;
|
||||
|
||||
|
@ -199,5 +225,5 @@ const Family::BINDING_TABLE_STATE Family::cmdInitBindingTableState = Family::BIN
|
|||
const Family::MI_USER_INTERRUPT Family::cmdInitUserInterrupt = Family::MI_USER_INTERRUPT::sInit();
|
||||
const Family::XY_COPY_BLT Family::cmdInitXyCopyBlt = Family::XY_COPY_BLT::sInit();
|
||||
const Family::MI_FLUSH_DW Family::cmdInitMiFlushDw = Family::MI_FLUSH_DW::sInit();
|
||||
const Family::XY_COLOR_BLT Family::cmdInitXyColorBlt = Family::XY_COLOR_BLT::sInit();
|
||||
const Family::XY_FAST_COLOR_BLT Family::cmdInitXyColorBlt = Family::XY_FAST_COLOR_BLT::sInit();
|
||||
} // namespace NEO
|
||||
|
|
|
@ -54,6 +54,7 @@ struct TGLLPFamily : public GEN12LP {
|
|||
using WALKER_TYPE = GPGPU_WALKER;
|
||||
using VFE_STATE_TYPE = MEDIA_VFE_STATE;
|
||||
using XY_COPY_BLT = typename GfxFamily::XY_BLOCK_COPY_BLT;
|
||||
using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT;
|
||||
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
|
||||
static const GPGPU_WALKER cmdInitGpgpuWalker;
|
||||
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;
|
||||
|
@ -85,7 +86,7 @@ struct TGLLPFamily : public GEN12LP {
|
|||
static const MI_USER_INTERRUPT cmdInitUserInterrupt;
|
||||
static const XY_COPY_BLT cmdInitXyCopyBlt;
|
||||
static const MI_FLUSH_DW cmdInitMiFlushDw;
|
||||
static const XY_COLOR_BLT cmdInitXyColorBlt;
|
||||
static const XY_FAST_COLOR_BLT cmdInitXyColorBlt;
|
||||
|
||||
static constexpr bool supportsCmdSet(GFXCORE_FAMILY cmdSetBaseFamily) {
|
||||
return cmdSetBaseFamily == IGFX_GEN8_CORE;
|
||||
|
|
|
@ -4071,175 +4071,6 @@ typedef struct tagXY_SRC_COPY_BLT {
|
|||
} XY_SRC_COPY_BLT;
|
||||
STATIC_ASSERT(40 == sizeof(XY_SRC_COPY_BLT));
|
||||
|
||||
typedef struct tagXY_COLOR_BLT {
|
||||
union tagTheStructure {
|
||||
struct tagCommon {
|
||||
// DWORD 0
|
||||
uint32_t DwordLength : BITFIELD_RANGE(0, 7);
|
||||
uint32_t Reserved_8 : BITFIELD_RANGE(8, 10);
|
||||
uint32_t DestTilingEnable : BITFIELD_RANGE(11, 11);
|
||||
uint32_t Reserved_12 : BITFIELD_RANGE(12, 19);
|
||||
uint32_t _32BppByteMask : BITFIELD_RANGE(20, 21);
|
||||
uint32_t InstructionTarget_Opcode : BITFIELD_RANGE(22, 28);
|
||||
uint32_t Client : BITFIELD_RANGE(29, 31);
|
||||
// DWORD 1
|
||||
uint32_t DestinationPitch : BITFIELD_RANGE(0, 15);
|
||||
uint32_t RasterOperation : BITFIELD_RANGE(16, 23);
|
||||
uint32_t ColorDepth : BITFIELD_RANGE(24, 25);
|
||||
uint32_t Reserved_58 : BITFIELD_RANGE(26, 29);
|
||||
uint32_t ClippingEnabled : BITFIELD_RANGE(30, 30);
|
||||
uint32_t Reserved_63 : BITFIELD_RANGE(31, 31);
|
||||
// DWORD 2
|
||||
uint32_t DestinationX1Coordinate_Left : BITFIELD_RANGE(0, 15);
|
||||
uint32_t DestinationY1Coordinate_Top : BITFIELD_RANGE(16, 31);
|
||||
// DWORD 3
|
||||
uint32_t DestinationX2Coordinate_Right : BITFIELD_RANGE(0, 15);
|
||||
uint32_t DestinationY2Coordinate_Bottom : BITFIELD_RANGE(16, 31);
|
||||
// DWORD 4-5
|
||||
uint64_t DestinationBaseAddress;
|
||||
// DWORD 6
|
||||
uint32_t SolidPaternColor;
|
||||
} Common;
|
||||
uint32_t RawData[7];
|
||||
} TheStructure;
|
||||
typedef enum tagDEST_TILING_ENABLE {
|
||||
DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT = 0x0,
|
||||
DEST_TILING_ENABLE_TILING_ENABLED = 0x1,
|
||||
} DEST_TILING_ENABLE;
|
||||
typedef enum tag_32BPP_BYTE_MASK {
|
||||
_32BPP_BYTE_MASK_WRITE_RGB_CHANNEL = 0x1,
|
||||
_32BPP_BYTE_MASK_WRITE_ALPHA_CHANNEL = 0x2,
|
||||
_32BPP_BYTE_MASK_WRITE_RGBA_CHANNEL = 0x3
|
||||
} _32BPP_BYTE_MASK;
|
||||
typedef enum tagCLIENT {
|
||||
CLIENT_2D_PROCESSOR = 0x2,
|
||||
} CLIENT;
|
||||
typedef enum tagCOLOR_DEPTH {
|
||||
COLOR_DEPTH_8_BIT_COLOR = 0x0,
|
||||
COLOR_DEPTH_16_BIT_COLOR565 = 0x1,
|
||||
COLOR_DEPTH_16_BIT_COLOR1555 = 0x2,
|
||||
COLOR_DEPTH_32_BIT_COLOR = 0x3,
|
||||
} COLOR_DEPTH;
|
||||
typedef enum tagCLIPPING_ENABLED {
|
||||
CLIPPING_ENABLED_DISABLED = 0x0,
|
||||
CLIPPING_ENABLED_ENABLED = 0x1,
|
||||
} CLIPPING_ENABLED;
|
||||
typedef enum tagINSTRUCTIONTARGET_OPCODE {
|
||||
INSTRUCTIONTARGET_OPCODE_OPCODE = 0x50,
|
||||
} INSTRUCTIONTARGET_OPCODE;
|
||||
typedef enum tagDWORD_LENGTH {
|
||||
DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x5,
|
||||
} DWORD_LENGTH;
|
||||
inline void init(void) {
|
||||
memset(&TheStructure, 0, sizeof(TheStructure));
|
||||
TheStructure.Common.DestTilingEnable = DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT;
|
||||
TheStructure.Common.Client = CLIENT_2D_PROCESSOR;
|
||||
TheStructure.Common.ColorDepth = COLOR_DEPTH_8_BIT_COLOR;
|
||||
TheStructure.Common.ClippingEnabled = CLIPPING_ENABLED_DISABLED;
|
||||
TheStructure.Common.InstructionTarget_Opcode = INSTRUCTIONTARGET_OPCODE_OPCODE;
|
||||
TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1;
|
||||
TheStructure.Common.RasterOperation = 0xF0;
|
||||
}
|
||||
static tagXY_COLOR_BLT sInit(void) {
|
||||
XY_COLOR_BLT state;
|
||||
state.init();
|
||||
return state;
|
||||
}
|
||||
inline uint32_t &getRawData(const uint32_t index) {
|
||||
UNRECOVERABLE_IF(index >= 10);
|
||||
return TheStructure.RawData[index];
|
||||
}
|
||||
inline void setDestTilingEnable(const DEST_TILING_ENABLE value) {
|
||||
TheStructure.Common.DestTilingEnable = value;
|
||||
}
|
||||
inline DEST_TILING_ENABLE getDestTilingEnable(void) const {
|
||||
return static_cast<DEST_TILING_ENABLE>(TheStructure.Common.DestTilingEnable);
|
||||
}
|
||||
inline void set32BppByteMask(const _32BPP_BYTE_MASK value) {
|
||||
TheStructure.Common._32BppByteMask = value;
|
||||
}
|
||||
inline _32BPP_BYTE_MASK get32BppByteMask(void) const {
|
||||
return static_cast<_32BPP_BYTE_MASK>(TheStructure.Common._32BppByteMask);
|
||||
}
|
||||
inline void setInstructionTargetOpcode(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0x1fc00000);
|
||||
TheStructure.Common.InstructionTarget_Opcode = value;
|
||||
}
|
||||
inline uint32_t getInstructionTargetOpcode(void) const {
|
||||
return TheStructure.Common.InstructionTarget_Opcode;
|
||||
}
|
||||
inline void setClient(const CLIENT value) {
|
||||
TheStructure.Common.Client = value;
|
||||
}
|
||||
inline CLIENT getClient(void) const {
|
||||
return static_cast<CLIENT>(TheStructure.Common.Client);
|
||||
}
|
||||
inline void setDestinationPitch(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff);
|
||||
TheStructure.Common.DestinationPitch = value;
|
||||
}
|
||||
inline uint32_t getDestinationPitch(void) const {
|
||||
return TheStructure.Common.DestinationPitch;
|
||||
}
|
||||
inline void setRasterOperation(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xff0000);
|
||||
TheStructure.Common.RasterOperation = value;
|
||||
}
|
||||
inline uint32_t getRasterOperation(void) const {
|
||||
return TheStructure.Common.RasterOperation;
|
||||
}
|
||||
inline void setColorDepth(const COLOR_DEPTH value) {
|
||||
TheStructure.Common.ColorDepth = value;
|
||||
}
|
||||
inline COLOR_DEPTH getColorDepth(void) const {
|
||||
return static_cast<COLOR_DEPTH>(TheStructure.Common.ColorDepth);
|
||||
}
|
||||
inline void setClippingEnabled(const CLIPPING_ENABLED value) {
|
||||
TheStructure.Common.ClippingEnabled = value;
|
||||
}
|
||||
inline CLIPPING_ENABLED getClippingEnabled(void) const {
|
||||
return static_cast<CLIPPING_ENABLED>(TheStructure.Common.ClippingEnabled);
|
||||
}
|
||||
inline void setDestinationX1CoordinateLeft(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff);
|
||||
TheStructure.Common.DestinationX1Coordinate_Left = value;
|
||||
}
|
||||
inline uint32_t getDestinationX1CoordinateLeft(void) const {
|
||||
return TheStructure.Common.DestinationX1Coordinate_Left;
|
||||
}
|
||||
inline void setDestinationY1CoordinateTop(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff0000);
|
||||
TheStructure.Common.DestinationY1Coordinate_Top = value;
|
||||
}
|
||||
inline uint32_t getDestinationY1CoordinateTop(void) const {
|
||||
return TheStructure.Common.DestinationY1Coordinate_Top;
|
||||
}
|
||||
inline void setTransferWidth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff);
|
||||
TheStructure.Common.DestinationX2Coordinate_Right = value;
|
||||
}
|
||||
inline uint32_t getTransferWidth(void) const {
|
||||
return TheStructure.Common.DestinationX2Coordinate_Right;
|
||||
}
|
||||
inline void setTransferHeight(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff0000);
|
||||
TheStructure.Common.DestinationY2Coordinate_Bottom = value;
|
||||
}
|
||||
inline uint32_t getTransferHeight(void) const {
|
||||
return TheStructure.Common.DestinationY2Coordinate_Bottom;
|
||||
}
|
||||
inline void setDestinationBaseAddress(const uint64_t value) {
|
||||
TheStructure.Common.DestinationBaseAddress = value;
|
||||
}
|
||||
inline uint64_t getDestinationBaseAddress(void) const {
|
||||
return TheStructure.Common.DestinationBaseAddress;
|
||||
}
|
||||
inline void setFillColor(const uint32_t *value) {
|
||||
TheStructure.Common.SolidPaternColor = *value;
|
||||
}
|
||||
} XY_COLOR_BLT;
|
||||
STATIC_ASSERT(28 == sizeof(XY_COLOR_BLT));
|
||||
|
||||
typedef struct tagMI_FLUSH_DW {
|
||||
union tagTheStructure {
|
||||
struct tagCommon {
|
||||
|
@ -5641,4 +5472,178 @@ typedef struct tagXY_BLOCK_COPY_BLT {
|
|||
} XY_BLOCK_COPY_BLT;
|
||||
STATIC_ASSERT(48 == sizeof(XY_BLOCK_COPY_BLT));
|
||||
|
||||
typedef struct tagXY_FAST_COLOR_BLT {
|
||||
union tagTheStructure {
|
||||
struct tagCommon {
|
||||
// DWORD 0
|
||||
uint32_t DwordLength : BITFIELD_RANGE(0, 7);
|
||||
uint32_t Reserved_8 : BITFIELD_RANGE(8, 18);
|
||||
uint32_t ColorDepth : BITFIELD_RANGE(19, 21);
|
||||
uint32_t InstructionTarget_Opcode : BITFIELD_RANGE(22, 28);
|
||||
uint32_t Client : BITFIELD_RANGE(29, 31);
|
||||
// DWORD 1
|
||||
uint32_t DestinationPitch : BITFIELD_RANGE(0, 17);
|
||||
uint32_t Reserved_50 : BITFIELD_RANGE(18, 20);
|
||||
uint32_t DestinationMocsValue : BITFIELD_RANGE(21, 27);
|
||||
uint32_t Reserved_60 : BITFIELD_RANGE(28, 29);
|
||||
uint32_t DestinationTiling : BITFIELD_RANGE(30, 31);
|
||||
// DWORD 2
|
||||
uint32_t DestinationX1Coordinate_Left : BITFIELD_RANGE(0, 15);
|
||||
uint32_t DestinationY1Coordinate_Top : BITFIELD_RANGE(16, 31);
|
||||
// DWORD 3
|
||||
uint32_t DestinationX2Coordinate_Right : BITFIELD_RANGE(0, 15);
|
||||
uint32_t DestinationY2Coordinate_Bottom : BITFIELD_RANGE(16, 31);
|
||||
// DWORD 4
|
||||
uint64_t DestinationBaseAddress;
|
||||
// DWORD 6
|
||||
uint32_t DestinationXOffset : BITFIELD_RANGE(0, 13);
|
||||
uint32_t Reserved_206 : BITFIELD_RANGE(14, 15);
|
||||
uint32_t DestinationYOffset : BITFIELD_RANGE(16, 29);
|
||||
uint32_t Reserved_222 : BITFIELD_RANGE(30, 31);
|
||||
// DWORD 7
|
||||
uint32_t FillColor[4];
|
||||
// DWORD 11
|
||||
uint32_t DestinationClearAddressHigh : BITFIELD_RANGE(0, 15);
|
||||
uint32_t Reserved_368 : BITFIELD_RANGE(16, 31);
|
||||
} Common;
|
||||
uint32_t RawData[12];
|
||||
} TheStructure;
|
||||
typedef enum tagDWORD_LENGTH {
|
||||
DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x9,
|
||||
} DWORD_LENGTH;
|
||||
typedef enum tagCOLOR_DEPTH {
|
||||
COLOR_DEPTH_8_BIT_COLOR = 0x0,
|
||||
COLOR_DEPTH_16_BIT_COLOR = 0x1,
|
||||
COLOR_DEPTH_32_BIT_COLOR = 0x2,
|
||||
COLOR_DEPTH_64_BIT_COLOR = 0x3,
|
||||
COLOR_DEPTH_96_BIT_COLOR_ONLY_SUPPORTED_FOR_LINEAR_CASE = 0x4,
|
||||
COLOR_DEPTH_128_BIT_COLOR = 0x5,
|
||||
} COLOR_DEPTH;
|
||||
typedef enum tagCLIENT {
|
||||
CLIENT_2D_PROCESSOR = 0x2,
|
||||
} CLIENT;
|
||||
typedef enum tagDESTINATION_TILING {
|
||||
DESTINATION_TILING_YMAJOR = 0x1,
|
||||
} DESTINATION_TILING;
|
||||
typedef enum tagINSTRUCTIONTARGET_OPCODE {
|
||||
INSTRUCTIONTARGET_OPCODE_OPCODE = 0x44,
|
||||
} INSTRUCTIONTARGET_OPCODE;
|
||||
inline void init(void) {
|
||||
memset(&TheStructure, 0, sizeof(TheStructure));
|
||||
TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1;
|
||||
TheStructure.Common.ColorDepth = COLOR_DEPTH_8_BIT_COLOR;
|
||||
TheStructure.Common.Client = CLIENT_2D_PROCESSOR;
|
||||
TheStructure.Common.InstructionTarget_Opcode = INSTRUCTIONTARGET_OPCODE::INSTRUCTIONTARGET_OPCODE_OPCODE;
|
||||
}
|
||||
static tagXY_FAST_COLOR_BLT sInit(void) {
|
||||
XY_FAST_COLOR_BLT state;
|
||||
state.init();
|
||||
return state;
|
||||
}
|
||||
inline uint32_t &getRawData(const uint32_t index) {
|
||||
UNRECOVERABLE_IF(index >= 12);
|
||||
return TheStructure.RawData[index];
|
||||
}
|
||||
inline void setColorDepth(const COLOR_DEPTH value) {
|
||||
TheStructure.Common.ColorDepth = value;
|
||||
}
|
||||
inline COLOR_DEPTH getColorDepth(void) const {
|
||||
return static_cast<COLOR_DEPTH>(TheStructure.Common.ColorDepth);
|
||||
}
|
||||
inline void setInstructionTargetOpcode(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0x7f);
|
||||
TheStructure.Common.InstructionTarget_Opcode = value;
|
||||
}
|
||||
inline uint32_t getInstructionTargetOpcode(void) const {
|
||||
return TheStructure.Common.InstructionTarget_Opcode;
|
||||
}
|
||||
inline void setClient(const CLIENT value) {
|
||||
TheStructure.Common.Client = value;
|
||||
}
|
||||
inline CLIENT getClient(void) const {
|
||||
return static_cast<CLIENT>(TheStructure.Common.Client);
|
||||
}
|
||||
inline void setDestinationPitch(const uint32_t value) {
|
||||
TheStructure.Common.DestinationPitch = value - 1;
|
||||
}
|
||||
inline uint32_t getDestinationPitch(void) const {
|
||||
return TheStructure.Common.DestinationPitch + 1;
|
||||
}
|
||||
inline void setDestinationMocsValue(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0x7f);
|
||||
TheStructure.Common.DestinationMocsValue = value;
|
||||
}
|
||||
inline uint32_t getDestinationMocsValue(void) const {
|
||||
return TheStructure.Common.DestinationMocsValue;
|
||||
}
|
||||
inline void setDestinationTiling(const DESTINATION_TILING value) {
|
||||
TheStructure.Common.DestinationTiling = value;
|
||||
}
|
||||
inline DESTINATION_TILING getDestinationTiling(void) const {
|
||||
return static_cast<DESTINATION_TILING>(TheStructure.Common.DestinationTiling);
|
||||
}
|
||||
inline void setDestinationX1CoordinateLeft(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff);
|
||||
TheStructure.Common.DestinationX1Coordinate_Left = value;
|
||||
}
|
||||
inline uint32_t getDestinationX1CoordinateLeft(void) const {
|
||||
return TheStructure.Common.DestinationX1Coordinate_Left;
|
||||
}
|
||||
inline void setDestinationY1CoordinateTop(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff);
|
||||
TheStructure.Common.DestinationY1Coordinate_Top = value;
|
||||
}
|
||||
inline uint32_t getDestinationY1CoordinateTop(void) const {
|
||||
return TheStructure.Common.DestinationY1Coordinate_Top;
|
||||
}
|
||||
inline void setTransferWidth(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff);
|
||||
TheStructure.Common.DestinationX2Coordinate_Right = value;
|
||||
}
|
||||
inline uint32_t getTransferWidth(void) const {
|
||||
return TheStructure.Common.DestinationX2Coordinate_Right;
|
||||
}
|
||||
inline void setTransferHeight(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff);
|
||||
TheStructure.Common.DestinationY2Coordinate_Bottom = value;
|
||||
}
|
||||
inline uint32_t getTransferHeight(void) const {
|
||||
return TheStructure.Common.DestinationY2Coordinate_Bottom;
|
||||
}
|
||||
inline void setDestinationBaseAddress(const uint64_t value) {
|
||||
TheStructure.Common.DestinationBaseAddress = value;
|
||||
}
|
||||
inline uint64_t getDestinationBaseAddress(void) const {
|
||||
return TheStructure.Common.DestinationBaseAddress;
|
||||
}
|
||||
inline void setDestinationXOffset(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0x3fff);
|
||||
TheStructure.Common.DestinationXOffset = value;
|
||||
}
|
||||
inline uint32_t getDestinationXOffset(void) const {
|
||||
return TheStructure.Common.DestinationXOffset;
|
||||
}
|
||||
inline void setDestinationYOffset(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0x3fff);
|
||||
TheStructure.Common.DestinationYOffset = value;
|
||||
}
|
||||
inline uint32_t getDestinationYOffset(void) const {
|
||||
return TheStructure.Common.DestinationYOffset;
|
||||
}
|
||||
inline void setFillColor(const uint32_t *value) {
|
||||
TheStructure.Common.FillColor[0] = value[0];
|
||||
TheStructure.Common.FillColor[1] = value[1];
|
||||
TheStructure.Common.FillColor[2] = value[2];
|
||||
TheStructure.Common.FillColor[3] = value[3];
|
||||
}
|
||||
inline void setDestinationClearAddressHigh(const uint32_t value) {
|
||||
UNRECOVERABLE_IF(value > 0xffff);
|
||||
TheStructure.Common.DestinationClearAddressHigh = value;
|
||||
}
|
||||
inline uint32_t getDestinationClearAddressHigh(void) const {
|
||||
return TheStructure.Common.DestinationClearAddressHigh;
|
||||
}
|
||||
} XY_FAST_COLOR_BLT;
|
||||
STATIC_ASSERT(48 == sizeof(XY_FAST_COLOR_BLT));
|
||||
|
||||
#pragma pack()
|
||||
|
|
|
@ -182,9 +182,9 @@ HWTEST_F(BlitTests, givenMemorySizeTwiceBiggerThanMaxWidthWhenFillPatternWithBli
|
|||
}
|
||||
}
|
||||
|
||||
using BlitPlatforms = IsWithinProducts<IGFX_SKYLAKE, IGFX_TIGERLAKE_LP>;
|
||||
using BlitColor = IsWithinProducts<IGFX_SKYLAKE, IGFX_ICELAKE_LP>;
|
||||
|
||||
HWTEST2_F(BlitTests, givenMemoryWhenFillPatternSizeIs4BytesThen32BitMaskISSetCorrectly, BlitPlatforms) {
|
||||
HWTEST2_F(BlitTests, givenMemoryWhenFillPatternSizeIs4BytesThen32BitMaskISSetCorrectly, BlitColor) {
|
||||
using XY_COLOR_BLT = typename FamilyType::XY_COLOR_BLT;
|
||||
using COLOR_DEPTH = typename XY_COLOR_BLT::COLOR_DEPTH;
|
||||
uint32_t pattern = 1;
|
||||
|
@ -223,26 +223,66 @@ typename FamilyType::XY_COLOR_BLT::COLOR_DEPTH getColorDepth(size_t patternSize)
|
|||
return depth;
|
||||
}
|
||||
|
||||
HWTEST2_F(BlitColorTests, givenCommandStreamAndPaternSizeEqualOneWhenCallToDispatchMemoryFillThenColorDepthAreProgrammedCorrectly, BlitPlatforms) {
|
||||
HWTEST2_F(BlitColorTests, givenCommandStreamAndPaternSizeEqualOneWhenCallToDispatchMemoryFillThenColorDepthAreProgrammedCorrectly, BlitColor) {
|
||||
size_t patternSize = 1;
|
||||
auto expecttedDepth = getColorDepth<FamilyType>(patternSize);
|
||||
GivenLinearStreamWhenCallDispatchBlitMemoryColorFillThenCorrectDepthIsProgrammed<FamilyType> test(pDevice);
|
||||
test.TestBodyImpl(patternSize, expecttedDepth);
|
||||
}
|
||||
HWTEST2_F(BlitColorTests, givenCommandStreamAndPaternSizeEqualTwoWhenCallToDispatchMemoryFillThenColorDepthAreProgrammedCorrectly, BlitPlatforms) {
|
||||
HWTEST2_F(BlitColorTests, givenCommandStreamAndPaternSizeEqualTwoWhenCallToDispatchMemoryFillThenColorDepthAreProgrammedCorrectly, BlitColor) {
|
||||
size_t patternSize = 2;
|
||||
auto expecttedDepth = getColorDepth<FamilyType>(patternSize);
|
||||
GivenLinearStreamWhenCallDispatchBlitMemoryColorFillThenCorrectDepthIsProgrammed<FamilyType> test(pDevice);
|
||||
test.TestBodyImpl(patternSize, expecttedDepth);
|
||||
}
|
||||
HWTEST2_F(BlitColorTests, givenCommandStreamAndPaternSizeEqualFourWhenCallToDispatchMemoryFillThenColorDepthAreProgrammedCorrectly, BlitPlatforms) {
|
||||
HWTEST2_F(BlitColorTests, givenCommandStreamAndPaternSizeEqualFourWhenCallToDispatchMemoryFillThenColorDepthAreProgrammedCorrectly, BlitColor) {
|
||||
size_t patternSize = 4;
|
||||
auto expecttedDepth = getColorDepth<FamilyType>(patternSize);
|
||||
GivenLinearStreamWhenCallDispatchBlitMemoryColorFillThenCorrectDepthIsProgrammed<FamilyType> test(pDevice);
|
||||
test.TestBodyImpl(patternSize, expecttedDepth);
|
||||
}
|
||||
|
||||
using ImageSupport = IsWithinProducts<IGFX_SKYLAKE, IGFX_TIGERLAKE_LP>;
|
||||
using BlitPlatforms = IsWithinProducts<IGFX_SKYLAKE, IGFX_TIGERLAKE_LP>;
|
||||
template <typename FamilyType>
|
||||
typename FamilyType::XY_COLOR_BLT::COLOR_DEPTH getFastColorDepth(size_t patternSize) {
|
||||
using COLOR_DEPTH = typename FamilyType::XY_COLOR_BLT::COLOR_DEPTH;
|
||||
COLOR_DEPTH depth = {};
|
||||
switch (patternSize) {
|
||||
case 1:
|
||||
depth = COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR;
|
||||
break;
|
||||
case 2:
|
||||
depth = COLOR_DEPTH::COLOR_DEPTH_16_BIT_COLOR;
|
||||
break;
|
||||
case 4:
|
||||
depth = COLOR_DEPTH::COLOR_DEPTH_32_BIT_COLOR;
|
||||
break;
|
||||
case 8:
|
||||
depth = COLOR_DEPTH::COLOR_DEPTH_64_BIT_COLOR;
|
||||
break;
|
||||
case 16:
|
||||
depth = COLOR_DEPTH::COLOR_DEPTH_128_BIT_COLOR;
|
||||
break;
|
||||
}
|
||||
return depth;
|
||||
}
|
||||
|
||||
using BlitFastColorTest = BlitColorTests;
|
||||
|
||||
HWTEST2_P(BlitFastColorTest, givenCommandStreamWhenCallToDispatchMemoryFillThenColorDepthAreProgrammedCorrectly, IsGen12LP) {
|
||||
auto patternSize = GetParam();
|
||||
auto expecttedDepth = getFastColorDepth<FamilyType>(patternSize);
|
||||
GivenLinearStreamWhenCallDispatchBlitMemoryColorFillThenCorrectDepthIsProgrammed<FamilyType> test(pDevice);
|
||||
test.TestBodyImpl(patternSize, expecttedDepth);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(size_t,
|
||||
BlitFastColorTest,
|
||||
testing::Values(1,
|
||||
2,
|
||||
4,
|
||||
8,
|
||||
16));
|
||||
|
||||
HWTEST2_F(BlitTests, givenMemoryAndImageWhenDispatchCopyImageCallThenCommandAddedToStream, BlitPlatforms) {
|
||||
using XY_COPY_BLT = typename FamilyType::XY_COPY_BLT;
|
||||
|
|
Loading…
Reference in New Issue