Files
compute-runtime/unit_tests/gen9/coherency_tests_gen9.cpp
Mateusz Jablonski 1635bef9a8 Tests update: create memory manager for command stream receiver
Change-Id: I89b577759d6da112049a8b0135ae488f2849c140
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-09-03 14:24:02 +02:00

35 lines
1.0 KiB
C++

/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/command_stream_receiver_hw.h"
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/platform/platform.h"
#include "test.h"
using namespace NEO;
typedef ::testing::Test Gen9CoherencyRequirements;
GEN9TEST_F(Gen9CoherencyRequirements, noCoherencyProgramming) {
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
executionEnvironment->initializeMemoryManager();
CommandStreamReceiverHw<SKLFamily> csr(*executionEnvironment);
LinearStream stream;
DispatchFlags flags = {};
auto retSize = csr.getCmdSizeForComputeMode();
EXPECT_EQ(0u, retSize);
csr.programComputeMode(stream, flags);
EXPECT_EQ(0u, stream.getUsed());
flags.requiresCoherency = true;
retSize = csr.getCmdSizeForComputeMode();
EXPECT_EQ(0u, retSize);
csr.programComputeMode(stream, flags);
EXPECT_EQ(0u, stream.getUsed());
}