mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Move getDeviceIndex method to CommandStreamReceiverSimulatedCommonHw class
Related-To: NEO-3691 Change-Id: Ie425c035fcdd1467269ead131c4bd063c8b83e08 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
cf02ada7a1
commit
d11d3ad27e
@@ -303,10 +303,6 @@ IndirectHeap &CommandStreamReceiver::getIndirectHeap(IndirectHeap::Type heapType
|
||||
return *heap;
|
||||
}
|
||||
|
||||
uint32_t CommandStreamReceiver::getDeviceIndex() const {
|
||||
return osContext->getDeviceBitfield().any() ? static_cast<uint32_t>(Math::log2(static_cast<uint32_t>(osContext->getDeviceBitfield().to_ulong()))) : 0u;
|
||||
}
|
||||
|
||||
void CommandStreamReceiver::allocateHeapMemory(IndirectHeap::Type heapType,
|
||||
size_t minRequiredSize, IndirectHeap *&indirectHeap) {
|
||||
size_t reservedSize = 0;
|
||||
|
||||
@@ -193,7 +193,6 @@ class CommandStreamReceiver {
|
||||
|
||||
protected:
|
||||
void cleanupResources();
|
||||
MOCKABLE_VIRTUAL uint32_t getDeviceIndex() const;
|
||||
|
||||
std::unique_ptr<FlushStampTracker> flushStamp;
|
||||
std::unique_ptr<SubmissionAggregator> submissionAggregator;
|
||||
|
||||
@@ -24,16 +24,17 @@ class HardwareContextController;
|
||||
template <typename GfxFamily>
|
||||
class CommandStreamReceiverSimulatedCommonHw : public CommandStreamReceiverHw<GfxFamily> {
|
||||
protected:
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw;
|
||||
using CommandStreamReceiverHw<GfxFamily>::osContext;
|
||||
using CommandStreamReceiverHw<GfxFamily>::getDeviceIndex;
|
||||
using AUB = typename AUBFamilyMapper<GfxFamily>::AUB;
|
||||
using MiContextDescriptorReg = typename AUB::MiContextDescriptorReg;
|
||||
|
||||
bool getParametersForWriteMemory(GraphicsAllocation &graphicsAllocation, uint64_t &gpuAddress, void *&cpuAddress, size_t &size) const;
|
||||
void freeEngineInfo(AddressMapper >tRemap);
|
||||
MOCKABLE_VIRTUAL uint32_t getDeviceIndex() const;
|
||||
|
||||
public:
|
||||
CommandStreamReceiverSimulatedCommonHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
~CommandStreamReceiverSimulatedCommonHw() override;
|
||||
uint64_t getGTTBits() const {
|
||||
return 0u;
|
||||
}
|
||||
|
||||
@@ -89,4 +89,12 @@ void CommandStreamReceiverSimulatedCommonHw<GfxFamily>::freeEngineInfo(AddressMa
|
||||
engineInfo.pRingBuffer = nullptr;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
uint32_t CommandStreamReceiverSimulatedCommonHw<GfxFamily>::getDeviceIndex() const {
|
||||
return osContext->getDeviceBitfield().any() ? static_cast<uint32_t>(Math::log2(static_cast<uint32_t>(osContext->getDeviceBitfield().to_ulong()))) : 0u;
|
||||
}
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiverSimulatedCommonHw<GfxFamily>::CommandStreamReceiverSimulatedCommonHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : CommandStreamReceiverHw<GfxFamily>(executionEnvironment, rootDeviceIndex) {}
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiverSimulatedCommonHw<GfxFamily>::~CommandStreamReceiverSimulatedCommonHw() = default;
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user