2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2024-03-08 00:50:57 +08:00
|
|
|
* Copyright (C) 2021-2024 Intel Corporation
|
2018-09-18 15:11:08 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2021-01-21 20:10:13 +08:00
|
|
|
#include "shared/test/common/mocks/mock_command_stream_receiver.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2022-11-22 21:53:59 +08:00
|
|
|
volatile TagAddressType MockCommandStreamReceiver::mockTagAddress[MockCommandStreamReceiver::tagSize];
|
2021-10-20 03:28:05 +08:00
|
|
|
|
2022-01-07 22:53:31 +08:00
|
|
|
SubmissionStatus MockCommandStreamReceiver::flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) {
|
2023-06-19 22:02:37 +08:00
|
|
|
this->latestFlushedBatchBuffer = batchBuffer;
|
2023-12-13 17:17:24 +08:00
|
|
|
return SubmissionStatus::success;
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
CompletionStamp MockCommandStreamReceiver::flushTask(
|
|
|
|
LinearStream &commandStream,
|
2024-03-08 00:50:57 +08:00
|
|
|
size_t commandStreamStart,
|
|
|
|
const IndirectHeap *dsh,
|
|
|
|
const IndirectHeap *ioh,
|
|
|
|
const IndirectHeap *ssh,
|
|
|
|
TaskCountType taskLevel,
|
|
|
|
DispatchFlags &dispatchFlags,
|
|
|
|
Device &device) {
|
|
|
|
++taskCount;
|
|
|
|
CompletionStamp stamp = {taskCount, taskLevel, flushStamp->peekStamp()};
|
|
|
|
return stamp;
|
|
|
|
}
|
|
|
|
|
|
|
|
CompletionStamp MockCommandStreamReceiver::flushTaskStateless(
|
|
|
|
LinearStream &commandStream,
|
2017-12-21 07:45:38 +08:00
|
|
|
size_t commandStreamStart,
|
2022-03-28 20:55:12 +08:00
|
|
|
const IndirectHeap *dsh,
|
|
|
|
const IndirectHeap *ioh,
|
|
|
|
const IndirectHeap *ssh,
|
2022-11-22 21:53:59 +08:00
|
|
|
TaskCountType taskLevel,
|
2018-08-01 16:01:41 +08:00
|
|
|
DispatchFlags &dispatchFlags,
|
|
|
|
Device &device) {
|
2017-12-21 07:45:38 +08:00
|
|
|
++taskCount;
|
2018-11-26 21:04:52 +08:00
|
|
|
CompletionStamp stamp = {taskCount, taskLevel, flushStamp->peekStamp()};
|
2017-12-21 07:45:38 +08:00
|
|
|
return stamp;
|
|
|
|
}
|
2022-11-30 22:57:18 +08:00
|
|
|
|
|
|
|
CompletionStamp MockCommandStreamReceiver::flushBcsTask(LinearStream &commandStreamTask, size_t commandStreamTaskStart,
|
|
|
|
const DispatchBcsFlags &dispatchBcsFlags, const HardwareInfo &hwInfo) {
|
|
|
|
++taskCount;
|
|
|
|
CompletionStamp stamp = {taskCount, taskLevel, flushStamp->peekStamp()};
|
|
|
|
return stamp;
|
2023-06-01 21:21:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
CompletionStamp MockCommandStreamReceiver::flushImmediateTask(
|
|
|
|
LinearStream &immediateCommandStream,
|
|
|
|
size_t immediateCommandStreamStart,
|
|
|
|
ImmediateDispatchFlags &dispatchFlags,
|
|
|
|
Device &device) {
|
|
|
|
++taskCount;
|
|
|
|
CompletionStamp stamp = {taskCount, taskLevel, flushStamp->peekStamp()};
|
|
|
|
return stamp;
|
|
|
|
}
|
2024-03-29 11:22:39 +08:00
|
|
|
|
|
|
|
CompletionStamp MockCommandStreamReceiver::flushImmediateTaskStateless(
|
|
|
|
LinearStream &immediateCommandStream,
|
|
|
|
size_t immediateCommandStreamStart,
|
|
|
|
ImmediateDispatchFlags &dispatchFlags,
|
|
|
|
Device &device) {
|
|
|
|
++taskCount;
|
|
|
|
CompletionStamp stamp = {taskCount, taskLevel, flushStamp->peekStamp()};
|
|
|
|
return stamp;
|
|
|
|
}
|