2019-05-13 16:09:52 +08:00
|
|
|
/*
|
2020-02-05 23:07:52 +08:00
|
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
2019-05-13 16:09:52 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/helpers/blit_commands_helper_base.inl"
|
2019-05-13 16:09:52 +08:00
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-10 21:17:12 +08:00
|
|
|
void BlitCommandsHelper<GfxFamily>::appendBlitCommandsForBuffer(const BlitProperties &blitProperties, typename GfxFamily::XY_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment) {}
|
2019-05-13 16:09:52 +08:00
|
|
|
|
2020-05-21 18:36:23 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
void BlitCommandsHelper<GfxFamily>::appendBlitCommandsForImages(BlitProperties &blitProperties, typename GfxFamily::XY_COPY_BLT &blitCmd) {
|
|
|
|
appendTilingType(GMM_NOT_TILED, GMM_NOT_TILED, blitCmd);
|
|
|
|
}
|
|
|
|
|
2020-04-28 16:24:22 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
void BlitCommandsHelper<GfxFamily>::appendBlitCommandsForFillBuffer(NEO::GraphicsAllocation *dstAlloc, typename GfxFamily::XY_COLOR_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment) {
|
|
|
|
using XY_COLOR_BLT = typename GfxFamily::XY_COLOR_BLT;
|
|
|
|
if (blitCmd.getColorDepth() == XY_COLOR_BLT::COLOR_DEPTH::COLOR_DEPTH_32_BIT_COLOR) {
|
|
|
|
blitCmd.set32BppByteMask(XY_COLOR_BLT::_32BPP_BYTE_MASK::_32BPP_BYTE_MASK_WRITE_RGBA_CHANNEL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryColorFill(NEO::GraphicsAllocation *dstAlloc, uint32_t *pattern, size_t patternSize, LinearStream &linearStream, size_t size, const RootDeviceEnvironment &rootDeviceEnvironment) {
|
|
|
|
switch (patternSize) {
|
|
|
|
case 1:
|
|
|
|
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill<1>(dstAlloc, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill<2>(dstAlloc, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_16_BIT_COLOR1555);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill<4>(dstAlloc, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_32_BIT_COLOR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-21 18:36:23 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
void BlitCommandsHelper<GfxFamily>::appendSurfaceType(const BlitProperties &blitProperties, typename GfxFamily::XY_COPY_BLT &blitCmd) {
|
|
|
|
}
|
2020-04-28 16:24:22 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
void BlitCommandsHelper<GfxFamily>::appendTilingEnable(typename GfxFamily::XY_COLOR_BLT &blitCmd) {
|
|
|
|
using XY_COLOR_BLT = typename GfxFamily::XY_COLOR_BLT;
|
|
|
|
blitCmd.setDestTilingEnable(XY_COLOR_BLT::DEST_TILING_ENABLE::DEST_TILING_ENABLE_TILING_ENABLED);
|
|
|
|
}
|
|
|
|
|
2020-05-21 18:36:23 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
void BlitCommandsHelper<GfxFamily>::appendTilingType(const GMM_TILE_TYPE srcTilingType, const GMM_TILE_TYPE dstTilingType, typename GfxFamily::XY_COPY_BLT &blitCmd) {
|
|
|
|
}
|
|
|
|
template <typename GfxFamily>
|
|
|
|
void BlitCommandsHelper<GfxFamily>::appendColorDepth(const BlitProperties &blitProperites, typename GfxFamily::XY_COPY_BLT &blitCmd) {
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
void BlitCommandsHelper<GfxFamily>::appendSliceOffsets(const BlitProperties &blitProperties, typename GfxFamily::XY_COPY_BLT &blitCmd, uint32_t sliceIndex) {
|
|
|
|
}
|
|
|
|
|
2019-05-13 16:09:52 +08:00
|
|
|
} // namespace NEO
|