2020-01-17 15:56:05 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/command_container/command_encoder.h"
|
|
|
|
#include "shared/source/gen12lp/hw_cmds_base.h"
|
2020-03-03 18:59:49 +08:00
|
|
|
#include "shared/source/gen12lp/reg_configs.h"
|
2020-03-25 17:04:42 +08:00
|
|
|
#include "shared/source/helpers/preamble.h"
|
2020-01-17 15:56:05 +08:00
|
|
|
|
2020-07-31 14:40:52 +08:00
|
|
|
using Family = NEO::TGLLPFamily;
|
2020-01-17 15:56:05 +08:00
|
|
|
|
2020-07-31 14:40:52 +08:00
|
|
|
#include "shared/source/command_container/command_encoder.inl"
|
|
|
|
#include "shared/source/command_container/command_encoder_base.inl"
|
|
|
|
#include "shared/source/command_container/encode_compute_mode_tgllp_plus.inl"
|
2020-03-25 17:04:42 +08:00
|
|
|
|
2020-07-31 14:40:52 +08:00
|
|
|
namespace NEO {
|
2020-03-25 17:04:42 +08:00
|
|
|
template <>
|
2020-07-31 14:40:52 +08:00
|
|
|
size_t EncodeWA<Family>::getAdditionalPipelineSelectSize(Device &device) {
|
2020-03-25 17:04:42 +08:00
|
|
|
size_t size = 0;
|
|
|
|
if (device.getDefaultEngine().commandStreamReceiver->isRcs()) {
|
|
|
|
size += 2 * PreambleHelper<Family>::getCmdSizeForPipelineSelect(device.getHardwareInfo());
|
|
|
|
}
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
2020-01-17 15:56:05 +08:00
|
|
|
template <>
|
|
|
|
size_t EncodeStates<Family>::getAdjustStateComputeModeSize() {
|
|
|
|
return sizeof(typename Family::STATE_COMPUTE_MODE);
|
|
|
|
}
|
|
|
|
|
2020-03-19 17:29:36 +08:00
|
|
|
template <>
|
|
|
|
void EncodeComputeMode<Family>::adjustComputeMode(LinearStream &csr, uint32_t numGrfRequired, void *const stateComputeModePtr, bool isMultiOsContextCapable) {
|
|
|
|
STATE_COMPUTE_MODE *stateComputeMode = static_cast<STATE_COMPUTE_MODE *>(stateComputeModePtr);
|
|
|
|
auto buffer = csr.getSpace(sizeof(STATE_COMPUTE_MODE));
|
|
|
|
*reinterpret_cast<STATE_COMPUTE_MODE *>(buffer) = *stateComputeMode;
|
|
|
|
}
|
|
|
|
|
2020-03-25 17:04:42 +08:00
|
|
|
template <>
|
2020-07-31 14:40:52 +08:00
|
|
|
void EncodeWA<Family>::encodeAdditionalPipelineSelect(Device &device, LinearStream &stream, bool is3DPipeline) {
|
2020-03-25 17:04:42 +08:00
|
|
|
if (device.getDefaultEngine().commandStreamReceiver->isRcs()) {
|
|
|
|
PipelineSelectArgs args;
|
|
|
|
args.is3DPipelineRequired = is3DPipeline;
|
|
|
|
PreambleHelper<Family>::programPipelineSelect(&stream, args, device.getHardwareInfo());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-17 15:56:05 +08:00
|
|
|
template struct EncodeDispatchKernel<Family>;
|
|
|
|
template struct EncodeStates<Family>;
|
2020-02-26 02:23:04 +08:00
|
|
|
template struct EncodeMath<Family>;
|
2020-01-17 15:56:05 +08:00
|
|
|
template struct EncodeMathMMIO<Family>;
|
|
|
|
template struct EncodeIndirectParams<Family>;
|
|
|
|
template struct EncodeSetMMIO<Family>;
|
|
|
|
template struct EncodeL3State<Family>;
|
|
|
|
template struct EncodeMediaInterfaceDescriptorLoad<Family>;
|
|
|
|
template struct EncodeStateBaseAddress<Family>;
|
|
|
|
template struct EncodeStoreMMIO<Family>;
|
|
|
|
template struct EncodeSurfaceState<Family>;
|
2020-01-24 21:58:15 +08:00
|
|
|
template struct EncodeAtomic<Family>;
|
|
|
|
template struct EncodeSempahore<Family>;
|
2020-01-28 20:50:19 +08:00
|
|
|
template struct EncodeBatchBufferStartOrEnd<Family>;
|
2020-02-21 22:35:08 +08:00
|
|
|
template struct EncodeMiFlushDW<Family>;
|
2020-03-25 17:04:42 +08:00
|
|
|
template struct EncodeWA<Family>;
|
2020-04-03 23:38:09 +08:00
|
|
|
template struct EncodeMemoryPrefetch<Family>;
|
2020-01-24 21:58:15 +08:00
|
|
|
} // namespace NEO
|