Files
compute-runtime/runtime/command_stream/definitions/command_stream_receiver_simulated_hw.h
Mateusz Jablonski 8410bd6e18 Remove device index from command stream receiver
Change-Id: Ia84b0cb8e03260ec940ee0b175b12693e528b8aa
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-10-04 13:27:33 +02:00

48 lines
1.9 KiB
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/command_stream/command_stream_receiver_simulated_common_hw.h"
#include "runtime/memory_manager/memory_banks.h"
#include "runtime/memory_manager/physical_address_allocator.h"
namespace NEO {
class GraphicsAllocation;
template <typename GfxFamily>
class CommandStreamReceiverSimulatedHw : public CommandStreamReceiverSimulatedCommonHw<GfxFamily> {
protected:
using CommandStreamReceiverSimulatedCommonHw<GfxFamily>::CommandStreamReceiverSimulatedCommonHw;
using CommandStreamReceiverSimulatedCommonHw<GfxFamily>::osContext;
using CommandStreamReceiverSimulatedCommonHw<GfxFamily>::getDeviceIndex;
public:
uint32_t getMemoryBank(GraphicsAllocation *allocation) const {
return MemoryBanks::getBank(getDeviceIndex());
}
int getAddressSpace(int hint) {
return AubMemDump::AddressSpaceValues::TraceNonlocal;
}
PhysicalAddressAllocator *createPhysicalAddressAllocator(const HardwareInfo *hwInfo) {
return new PhysicalAddressAllocator();
}
void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation) override{};
void setAubWritable(bool writable, GraphicsAllocation &graphicsAllocation) override {
graphicsAllocation.setAubWritable(writable, getMemoryBank(&graphicsAllocation));
}
bool isAubWritable(GraphicsAllocation &graphicsAllocation) const override {
return graphicsAllocation.isAubWritable(getMemoryBank(&graphicsAllocation));
}
void setTbxWritable(bool writable, GraphicsAllocation &graphicsAllocation) override {
graphicsAllocation.setTbxWritable(writable, getMemoryBank(&graphicsAllocation));
}
bool isTbxWritable(GraphicsAllocation &graphicsAllocation) const override {
return graphicsAllocation.isTbxWritable(getMemoryBank(&graphicsAllocation));
}
};
} // namespace NEO