Files
compute-runtime/opencl/test/unit_test/gen9/coherency_tests_gen9.cpp
Filip Hazubski cd95572443 Reuse common logic of programming SCM fields for gen 9 and gen 11
Logic related to programming non coherent and thread arbitration policy for
gens 9 and 11 has been moved to EncodeComputeMode object, where similar
logic for gens gen12lp and newer is located.

Functions PreambleHelper::programThreadArbitration and
PreambleHelper::getThreadArbitrationCommandsSize have been removed.

Redundant setForceNonCoherent call has been removed from XE HPG

Related-To: NEO-6728

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-03-16 10:04:32 +01:00

32 lines
1.0 KiB
C++

/*
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/helpers/dispatch_flags_helper.h"
#include "shared/test/common/libult/ult_command_stream_receiver.h"
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/mocks/ult_device_factory.h"
#include "shared/test/common/test_macros/test.h"
using namespace NEO;
typedef ::testing::Test Gen9CoherencyRequirements;
GEN9TEST_F(Gen9CoherencyRequirements, WhenMemoryManagerIsInitializedThenNoCoherencyProgramming) {
UltDeviceFactory deviceFactory{1, 0};
LinearStream stream;
DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags();
auto &csr = deviceFactory.rootDevices[0]->getUltCommandStreamReceiver<FamilyType>();
csr.programComputeMode(stream, flags, *defaultHwInfo);
EXPECT_EQ(0u, stream.getUsed());
flags.requiresCoherency = true;
csr.programComputeMode(stream, flags, *defaultHwInfo);
EXPECT_EQ(0u, stream.getUsed());
}