mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: capability to write memory chunk in aub/tbx mode
Related-To: GSD-6604 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
faaceaaff8
commit
25195ebc96
@@ -33,6 +33,14 @@ struct WaitUserFenceParams {
|
||||
bool forceRetStatusValue = true;
|
||||
};
|
||||
|
||||
struct WriteMemoryParams {
|
||||
GraphicsAllocation *latestGfxAllocation = nullptr;
|
||||
uint64_t latestGpuVaChunkOffset = 0;
|
||||
size_t latestChunkSize = 0;
|
||||
uint32_t callCount = 0;
|
||||
bool latestChunkedMode = false;
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, public NonCopyableOrMovableClass {
|
||||
using BaseClass = CommandStreamReceiverHw<GfxFamily>;
|
||||
@@ -207,6 +215,17 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
||||
return BaseClass::flushImmediateTask(immediateCommandStream, immediateCommandStreamStart, dispatchFlags, device);
|
||||
}
|
||||
|
||||
bool writeMemory(GraphicsAllocation &gfxAllocation, bool isChunkCopy, uint64_t gpuVaChunkOffset, size_t chunkSize) override {
|
||||
writeMemoryParams.callCount++;
|
||||
|
||||
writeMemoryParams.latestGfxAllocation = &gfxAllocation;
|
||||
writeMemoryParams.latestChunkedMode = isChunkCopy;
|
||||
writeMemoryParams.latestGpuVaChunkOffset = gpuVaChunkOffset;
|
||||
writeMemoryParams.latestChunkSize = chunkSize;
|
||||
|
||||
return BaseClass::writeMemory(gfxAllocation, isChunkCopy, gpuVaChunkOffset, chunkSize);
|
||||
}
|
||||
|
||||
size_t getPreferredTagPoolSize() const override {
|
||||
return BaseClass::getPreferredTagPoolSize() + 1;
|
||||
}
|
||||
@@ -447,6 +466,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
||||
TaskCountType latestSentTaskCountValueDuringFlush = 0;
|
||||
WaitParams latestWaitForCompletionWithTimeoutWaitParams{0};
|
||||
WaitUserFenceParams waitUserFenecParams;
|
||||
WriteMemoryParams writeMemoryParams;
|
||||
TaskCountType flushBcsTaskReturnValue{};
|
||||
|
||||
LinearStream *lastFlushedCommandStream = nullptr;
|
||||
|
||||
@@ -103,8 +103,8 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
|
||||
batchBufferGpuAddressPassed = batchBufferGpuAddress;
|
||||
}
|
||||
|
||||
void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation) override {
|
||||
CommandStreamReceiverSimulatedHw<GfxFamily>::writeMemoryWithAubManager(graphicsAllocation);
|
||||
void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation, bool isChunkCopy, uint64_t gpuVaChunkOffset, size_t chunkSize) override {
|
||||
CommandStreamReceiverSimulatedHw<GfxFamily>::writeMemoryWithAubManager(graphicsAllocation, isChunkCopy, gpuVaChunkOffset, chunkSize);
|
||||
writeMemoryWithAubManagerCalled = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ class MockTbxCsr : public TbxCommandStreamReceiverHw<GfxFamily> {
|
||||
initializeEngineCalled = true;
|
||||
}
|
||||
|
||||
void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation) override {
|
||||
CommandStreamReceiverSimulatedHw<GfxFamily>::writeMemoryWithAubManager(graphicsAllocation);
|
||||
void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation, bool isChunkCopy, uint64_t gpuVaChunkOffset, size_t chunkSize) override {
|
||||
CommandStreamReceiverSimulatedHw<GfxFamily>::writeMemoryWithAubManager(graphicsAllocation, isChunkCopy, gpuVaChunkOffset, chunkSize);
|
||||
writeMemoryWithAubManagerCalled = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user