mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Simplifiy specialization command list methods
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f98c6b1a8b
commit
0c025cc9ed
@@ -48,7 +48,7 @@ struct CommandListCoreFamily : CommandListImp {
|
||||
|
||||
using CommandListImp::CommandListImp;
|
||||
ze_result_t initialize(Device *device, NEO::EngineGroupType engineGroupType, ze_command_list_flags_t flags) override;
|
||||
virtual void programL3(bool isSLMused);
|
||||
void programL3(bool isSLMused);
|
||||
~CommandListCoreFamily() override;
|
||||
|
||||
ze_result_t close() override;
|
||||
|
||||
@@ -9,7 +9,6 @@ if(SUPPORT_GEN11)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_gen11.cpp
|
||||
|
||||
@@ -5,20 +5,32 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/core/source/gen11/cmdlist_gen11.inl"
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_base.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/pipe_control_args.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.inl"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_base.inl"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl"
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
|
||||
#include "cmdlist_extended.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
void CommandListCoreFamily<IGFX_GEN11_CORE>::applyMemoryRangesBarrier(uint32_t numRanges,
|
||||
const size_t *pRangeSizes,
|
||||
const void **pRanges) {
|
||||
const auto &hwInfo = this->device->getHwInfo();
|
||||
NEO::PipeControlArgs args;
|
||||
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(),
|
||||
args);
|
||||
}
|
||||
|
||||
template struct CommandListCoreFamily<IGFX_GEN11_CORE>;
|
||||
template struct CommandListCoreFamilyImmediate<IGFX_GEN11_CORE>;
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/pipe_control_args.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.h"
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
void CommandListCoreFamily<gfxCoreFamily>::applyMemoryRangesBarrier(uint32_t numRanges,
|
||||
const size_t *pRangeSizes,
|
||||
const void **pRanges) {
|
||||
const auto &hwInfo = this->device->getHwInfo();
|
||||
NEO::PipeControlArgs args;
|
||||
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(),
|
||||
args);
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
@@ -9,7 +9,6 @@ if(SUPPORT_GEN9)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_gen9.cpp
|
||||
|
||||
@@ -5,19 +5,38 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/core/source/gen9/cmdlist_gen9.inl"
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/gen9/hw_cmds_base.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/pipe_control_args.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.inl"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_base.inl"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl"
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
|
||||
#include "cmdlist_extended.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
void CommandListCoreFamily<IGFX_GEN9_CORE>::applyMemoryRangesBarrier(uint32_t numRanges,
|
||||
const size_t *pRangeSizes,
|
||||
const void **pRanges) {
|
||||
const auto &hwInfo = this->device->getHwInfo();
|
||||
NEO::PipeControlArgs args;
|
||||
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(),
|
||||
args);
|
||||
}
|
||||
|
||||
template <>
|
||||
void CommandListCoreFamily<IGFX_GEN9_CORE>::programL3(bool isSLMused) {
|
||||
NEO::EncodeL3State<GfxFamily>::encode(commandContainer, isSLMused);
|
||||
}
|
||||
|
||||
template struct CommandListCoreFamily<IGFX_GEN9_CORE>;
|
||||
template struct CommandListCoreFamilyImmediate<IGFX_GEN9_CORE>;
|
||||
} // namespace L0
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
@@ -21,10 +20,6 @@ namespace L0 {
|
||||
template <PRODUCT_FAMILY gfxProductFamily>
|
||||
struct CommandListProductFamily : public CommandListCoreFamily<IGFX_GEN9_CORE> {
|
||||
using CommandListCoreFamily::CommandListCoreFamily;
|
||||
|
||||
void programL3(bool isSLMused) override {
|
||||
NEO::EncodeL3State<GfxFamily>::encode(commandContainer, isSLMused);
|
||||
}
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY gfxProductFamily>
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
#include "shared/source/helpers/pipe_control_args.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.h"
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
|
||||
namespace L0 {
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
void CommandListCoreFamily<gfxCoreFamily>::applyMemoryRangesBarrier(uint32_t numRanges,
|
||||
const size_t *pRangeSizes,
|
||||
const void **pRanges) {
|
||||
const auto &hwInfo = this->device->getHwInfo();
|
||||
NEO::PipeControlArgs args;
|
||||
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(),
|
||||
args);
|
||||
}
|
||||
} // namespace L0
|
||||
Reference in New Issue
Block a user