mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Move SCM related WAs logic from CSR to EncodeComputeMode
This will help with unifying the logic between APIs and GENs. Related-To: NEO-6728 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7d6bee26c7
commit
3eab7009ac
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,6 +18,21 @@ using Family = NEO::ICLFamily;
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
size_t EncodeComputeMode<Family>::getCmdSizeForComputeMode(const HardwareInfo &hwInfo, bool hasSharedHandles, bool isRcs) {
|
||||
return sizeof(typename Family::MI_LOAD_REGISTER_IMM);
|
||||
}
|
||||
|
||||
template <>
|
||||
void EncodeComputeMode<Family>::programComputeModeCommandWithSynchronization(
|
||||
LinearStream &csr, StateComputeModeProperties &properties, const PipelineSelectArgs &args,
|
||||
bool hasSharedHandles, const HardwareInfo &hwInfo, bool isRcs) {
|
||||
LriHelper<Family>::program(&csr,
|
||||
gen11HdcModeRegister::address,
|
||||
DwordBuilder::build(gen11HdcModeRegister::forceNonCoherentEnableBit, true, !properties.isCoherencyRequired.value),
|
||||
false);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool EncodeSurfaceState<Family>::doBindingTablePrefetch() {
|
||||
return false;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl"
|
||||
#include "shared/source/command_stream/device_command_stream.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
@@ -17,21 +18,17 @@ typedef ICLFamily Family;
|
||||
static auto gfxCore = IGFX_GEN11_CORE;
|
||||
|
||||
template <>
|
||||
size_t CommandStreamReceiverHw<Family>::getCmdSizeForComputeMode() {
|
||||
if (this->streamProperties.stateComputeMode.isDirty()) {
|
||||
return sizeof(typename Family::MI_LOAD_REGISTER_IMM);
|
||||
void CommandStreamReceiverHw<Family>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo) {
|
||||
if (this->isComputeModeNeeded()) {
|
||||
EncodeComputeMode<Family>::programComputeModeCommandWithSynchronization(
|
||||
stream, this->streamProperties.stateComputeMode, dispatchFlags.pipelineSelectArgs,
|
||||
hasSharedHandles(), hwInfo, isRcs());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <>
|
||||
void CommandStreamReceiverHw<Family>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo) {
|
||||
if (this->streamProperties.stateComputeMode.isDirty()) {
|
||||
LriHelper<Family>::program(&stream,
|
||||
gen11HdcModeRegister::address,
|
||||
DwordBuilder::build(gen11HdcModeRegister::forceNonCoherentEnableBit, true, !dispatchFlags.requiresCoherency),
|
||||
false);
|
||||
}
|
||||
template <typename GfxFamily>
|
||||
inline bool CommandStreamReceiverHw<GfxFamily>::isComputeModeNeeded() const {
|
||||
return this->streamProperties.stateComputeMode.isCoherencyRequired.isDirty;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
Reference in New Issue
Block a user