2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2018-09-18 15:11:08 +08:00
|
|
|
* Copyright (C) 2018 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "hw_info.h"
|
|
|
|
#include "hw_cmds.h"
|
|
|
|
#include "runtime/command_stream/device_command_stream.h"
|
|
|
|
#include "runtime/command_stream/command_stream_receiver_hw.inl"
|
|
|
|
|
|
|
|
namespace OCLRT {
|
|
|
|
typedef BDWFamily Family;
|
|
|
|
static auto gfxCore = IGFX_GEN8_CORE;
|
|
|
|
|
|
|
|
template <>
|
2018-09-21 20:06:35 +08:00
|
|
|
size_t CommandStreamReceiverHw<Family>::getCmdSizeForComputeMode() {
|
2017-12-21 07:45:38 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
2018-09-21 20:06:35 +08:00
|
|
|
void CommandStreamReceiverHw<Family>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags) {
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
void CommandStreamReceiverHw<Family>::addPipeControlWA(LinearStream &commandStream, bool flushDC) {
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
2018-04-13 17:05:09 +08:00
|
|
|
int CommandStreamReceiverHw<Family>::getRequiredPipeControlSize() const {
|
2017-12-21 07:45:38 +08:00
|
|
|
return 1 * sizeof(Family::PIPE_CONTROL);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
void CommandStreamReceiverHw<Family>::addDcFlushToPipeControl(Family::PIPE_CONTROL *pCmd, bool flushDC) {
|
|
|
|
pCmd->setDcFlushEnable(flushDC);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
|
|
|
|
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
|
|
|
commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver<Family>::create;
|
|
|
|
}
|
|
|
|
|
2018-05-21 16:57:28 +08:00
|
|
|
template <>
|
|
|
|
void CommandStreamReceiverHw<Family>::addClearSLMWorkAround(Family::PIPE_CONTROL *pCmd) {
|
|
|
|
pCmd->setProtectedMemoryDisable(1);
|
|
|
|
}
|
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
// Explicitly instantiate CommandStreamReceiverHw for this device family
|
|
|
|
template class CommandStreamReceiverHw<Family>;
|
|
|
|
|
|
|
|
const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit();
|
|
|
|
const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit();
|
|
|
|
const Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD Family::cmdInitMediaInterfaceDescriptorLoad = Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD::sInit();
|
|
|
|
const Family::MEDIA_STATE_FLUSH Family::cmdInitMediaStateFlush = Family::MEDIA_STATE_FLUSH::sInit();
|
|
|
|
const Family::MI_BATCH_BUFFER_START Family::cmdInitBatchBufferStart = Family::MI_BATCH_BUFFER_START::sInit();
|
|
|
|
const Family::MI_BATCH_BUFFER_END Family::cmdInitBatchBufferEnd = Family::MI_BATCH_BUFFER_END::sInit();
|
|
|
|
const Family::PIPE_CONTROL Family::cmdInitPipeControl = Family::PIPE_CONTROL::sInit();
|
2018-11-02 13:59:42 +08:00
|
|
|
const Family::MI_SEMAPHORE_WAIT Family::cmdInitMiSemaphoreWait = Family::MI_SEMAPHORE_WAIT::sInit();
|
2018-11-22 22:16:20 +08:00
|
|
|
const Family::RENDER_SURFACE_STATE Family::cmdRenderSurfaceState = Family::RENDER_SURFACE_STATE::sInit();
|
2017-12-21 07:45:38 +08:00
|
|
|
} // namespace OCLRT
|