mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Refactor state base address programing 3/n
This is small optimization to replace virtual call and retrieved struct with cached value. Related-To: NEO-5055 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
075c96267d
commit
3cb064fe95
@@ -39,7 +39,6 @@ struct StateBaseAddressHelperArgs {
|
||||
const IndirectHeap *ioh = nullptr;
|
||||
const IndirectHeap *ssh = nullptr;
|
||||
GmmHelper *gmmHelper = nullptr;
|
||||
const HardwareInfo *hwInfo = nullptr;
|
||||
|
||||
uint32_t statelessMocsIndex = 0;
|
||||
MemoryCompressionState memoryCompressionState;
|
||||
@@ -52,6 +51,7 @@ struct StateBaseAddressHelperArgs {
|
||||
bool areMultipleSubDevicesInContext = false;
|
||||
bool overrideSurfaceStateBaseAddress = false;
|
||||
bool isDebuggerActive = false;
|
||||
bool doubleSbaWa = false;
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -24,8 +24,7 @@ void StateBaseAddressHelper<GfxFamily>::programStateBaseAddressIntoCommandStream
|
||||
auto cmdSpace = StateBaseAddressHelper<GfxFamily>::getSpaceForSbaCmd(commandStream);
|
||||
*cmdSpace = *args.stateBaseAddressCmd;
|
||||
|
||||
auto &productHelper = args.gmmHelper->getRootDeviceEnvironment().template getHelper<ProductHelper>();
|
||||
if (productHelper.isAdditionalStateBaseAddressWARequired(*args.hwInfo)) {
|
||||
if (args.doubleSbaWa) {
|
||||
auto cmdSpace = StateBaseAddressHelper<GfxFamily>::getSpaceForSbaCmd(commandStream);
|
||||
*cmdSpace = *args.stateBaseAddressCmd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user