mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
Unify write memory in simulated csr when aub manager is available
Change-Id: I28d0496b1b1fb973af4869e5626082142b5818dd Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
e318156d9d
commit
db8c2bc57e
@@ -57,6 +57,7 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
|
||||
using CommandStreamReceiverHw<GfxFamily>::defaultSshSize;
|
||||
using AUBCommandStreamReceiverHw<GfxFamily>::taskCount;
|
||||
using AUBCommandStreamReceiverHw<GfxFamily>::pollForCompletionTaskCount;
|
||||
using AUBCommandStreamReceiverHw<GfxFamily>::writeMemory;
|
||||
|
||||
DispatchMode peekDispatchMode() const {
|
||||
return this->dispatchMode;
|
||||
@@ -80,7 +81,7 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::initializeEngine();
|
||||
initializeEngineCalled = true;
|
||||
}
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) {
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) override {
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(gpuAddress, cpuAddress, size, memoryBank, entryBits, devicesBitfield);
|
||||
writeMemoryCalled = true;
|
||||
}
|
||||
@@ -88,6 +89,12 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::submitBatchBuffer(batchBufferGpuAddress, batchBuffer, batchBufferSize, memoryBank, entryBits);
|
||||
submitBatchBufferCalled = true;
|
||||
}
|
||||
|
||||
void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation) override {
|
||||
CommandStreamReceiverSimulatedHw<GfxFamily>::writeMemoryWithAubManager(graphicsAllocation);
|
||||
writeMemoryWithAubManagerCalled = true;
|
||||
}
|
||||
|
||||
void pollForCompletion() override {
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::pollForCompletion();
|
||||
pollForCompletionCalled = true;
|
||||
@@ -107,6 +114,7 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
|
||||
bool initProgrammingFlagsCalled = false;
|
||||
bool initializeEngineCalled = false;
|
||||
bool writeMemoryCalled = false;
|
||||
bool writeMemoryWithAubManagerCalled = false;
|
||||
bool submitBatchBufferCalled = false;
|
||||
bool pollForCompletionCalled = false;
|
||||
bool expectMemoryEqualCalled = false;
|
||||
|
||||
@@ -35,6 +35,7 @@ class MockTbxCsrToTestWaitBeforeMakingNonResident : public TbxCommandStreamRecei
|
||||
template <typename GfxFamily>
|
||||
class MockTbxCsr : public TbxCommandStreamReceiverHw<GfxFamily> {
|
||||
public:
|
||||
using TbxCommandStreamReceiverHw<GfxFamily>::writeMemory;
|
||||
MockTbxCsr(const HardwareInfo &hwInfoIn, ExecutionEnvironment &executionEnvironment)
|
||||
: TbxCommandStreamReceiverHw<GfxFamily>(hwInfoIn, executionEnvironment) {}
|
||||
|
||||
@@ -42,7 +43,13 @@ class MockTbxCsr : public TbxCommandStreamReceiverHw<GfxFamily> {
|
||||
TbxCommandStreamReceiverHw<GfxFamily>::initializeEngine();
|
||||
initializeEngineCalled = true;
|
||||
}
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) {
|
||||
|
||||
void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation) override {
|
||||
CommandStreamReceiverSimulatedHw<GfxFamily>::writeMemoryWithAubManager(graphicsAllocation);
|
||||
writeMemoryWithAubManagerCalled = true;
|
||||
}
|
||||
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) override {
|
||||
TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(gpuAddress, cpuAddress, size, memoryBank, entryBits, devicesBitfield);
|
||||
writeMemoryCalled = true;
|
||||
}
|
||||
@@ -59,6 +66,7 @@ class MockTbxCsr : public TbxCommandStreamReceiverHw<GfxFamily> {
|
||||
makeCoherentCalled = true;
|
||||
}
|
||||
bool initializeEngineCalled = false;
|
||||
bool writeMemoryWithAubManagerCalled = false;
|
||||
bool writeMemoryCalled = false;
|
||||
bool submitBatchBufferCalled = false;
|
||||
bool pollForCompletionCalled = false;
|
||||
|
||||
Reference in New Issue
Block a user