Files
compute-runtime/unit_tests/gen8/coherency_tests_gen8.cpp
Jobczyk, Lukasz e784ba39fb [2/N] Make the execution environment adapter agnostic
-add rootDeviceId to the command stream receiver

Related-To: NEO-3857

Change-Id: I6c7f334ebe3d19cf0c58a4db65d013b7a8b7f982
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-10-29 17:15:01 +01:00

36 lines
1.1 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"
#include "unit_tests/helpers/dispatch_flags_helper.h"
using namespace NEO;
typedef ::testing::Test Gen8CoherencyRequirements;
GEN8TEST_F(Gen8CoherencyRequirements, noCoherencyProgramming) {
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
executionEnvironment->initializeMemoryManager();
CommandStreamReceiverHw<BDWFamily> csr(*executionEnvironment, 0);
LinearStream stream;
DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags();
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());
}