mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:06:32 +08:00
Moved code from: - shared/test/common/mocks/mock_execution_environment.h - shared/test/common/fixtures/mock_aub_center_fixture.h Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
49 lines
1.9 KiB
C++
49 lines
1.9 KiB
C++
/*
|
|
* Copyright (C) 2022 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/command_stream/stream_properties.h"
|
|
#include "shared/test/common/fixtures/command_stream_receiver_fixture.h"
|
|
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
template <typename FamilyType>
|
|
void CommandStreamReceiverSystolicFixture::testBody() {
|
|
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
|
StreamProperties &streamProperties = commandStreamReceiver.getStreamProperties();
|
|
|
|
commandStreamReceiver.isPreambleSent = true;
|
|
commandStreamReceiver.lastMediaSamplerConfig = false;
|
|
|
|
flushTaskFlags.pipelineSelectArgs.systolicPipelineSelectMode = true;
|
|
flushTaskFlags.pipelineSelectArgs.mediaSamplerRequired = false;
|
|
|
|
commandStreamReceiver.flushTask(commandStream,
|
|
0,
|
|
&dsh,
|
|
&ioh,
|
|
&ssh,
|
|
taskLevel,
|
|
flushTaskFlags,
|
|
*pDevice);
|
|
EXPECT_EQ(true, commandStreamReceiver.lastSystolicPipelineSelectMode);
|
|
EXPECT_EQ(1, streamProperties.pipelineSelect.systolicMode.value);
|
|
|
|
flushTaskFlags.pipelineSelectArgs.systolicPipelineSelectMode = false;
|
|
|
|
commandStreamReceiver.flushTask(commandStream,
|
|
0,
|
|
&dsh,
|
|
&ioh,
|
|
&ssh,
|
|
taskLevel,
|
|
flushTaskFlags,
|
|
*pDevice);
|
|
EXPECT_EQ(false, commandStreamReceiver.lastSystolicPipelineSelectMode);
|
|
EXPECT_EQ(0, streamProperties.pipelineSelect.systolicMode.value);
|
|
}
|