mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Refactor state base address programing 1/n
This refactor simplifies internal interfaces and implementations for different platforms. The change is introduction into adapting state base address helper class for all functional needs of the driver. Related-To: NEO-5055 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
29ed6ea077
commit
c7ca1b8cc7
@@ -15,7 +15,6 @@ using Family = NEO::Gen8Family;
|
||||
#include "shared/source/command_container/command_encoder_bdw_and_later.inl"
|
||||
#include "shared/source/command_container/encode_compute_mode_bdw_and_later.inl"
|
||||
#include "shared/source/command_container/image_surface_state/compression_params_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/state_base_address_bdw.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,12 +11,13 @@
|
||||
#include "shared/source/helpers/state_base_address_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
using Family = Gen8Family;
|
||||
|
||||
template <>
|
||||
void StateBaseAddressHelper<Gen8Family>::programStateBaseAddress(
|
||||
StateBaseAddressHelperArgs<Gen8Family> &args) {
|
||||
void StateBaseAddressHelper<Family>::programStateBaseAddress(
|
||||
StateBaseAddressHelperArgs<Family> &args) {
|
||||
|
||||
*args.stateBaseAddressCmd = Gen8Family::cmdInitStateBaseAddress;
|
||||
*args.stateBaseAddressCmd = Family::cmdInitStateBaseAddress;
|
||||
|
||||
if (args.dsh) {
|
||||
args.stateBaseAddressCmd->setDynamicStateBaseAddressModifyEnable(true);
|
||||
@@ -25,12 +26,7 @@ void StateBaseAddressHelper<Gen8Family>::programStateBaseAddress(
|
||||
args.stateBaseAddressCmd->setDynamicStateBufferSize(args.dsh->getHeapSizeInPages());
|
||||
}
|
||||
|
||||
if (args.ioh) {
|
||||
args.stateBaseAddressCmd->setIndirectObjectBaseAddressModifyEnable(true);
|
||||
args.stateBaseAddressCmd->setIndirectObjectBufferSizeModifyEnable(true);
|
||||
args.stateBaseAddressCmd->setIndirectObjectBaseAddress(args.ioh->getHeapGpuBase());
|
||||
args.stateBaseAddressCmd->setIndirectObjectBufferSize(args.ioh->getHeapSizeInPages());
|
||||
}
|
||||
StateBaseAddressHelper<Family>::appendIohParameters(args);
|
||||
|
||||
if (args.ssh) {
|
||||
args.stateBaseAddressCmd->setSurfaceStateBaseAddressModifyEnable(true);
|
||||
@@ -68,7 +64,7 @@ void StateBaseAddressHelper<Gen8Family>::programStateBaseAddress(
|
||||
|
||||
args.stateBaseAddressCmd->setStatelessDataPortAccessMemoryObjectControlState(args.statelessMocsIndex);
|
||||
|
||||
appendStateBaseAddressParameters(args, true);
|
||||
appendStateBaseAddressParameters(args);
|
||||
}
|
||||
template struct StateBaseAddressHelper<Gen8Family>;
|
||||
template struct StateBaseAddressHelper<Family>;
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user