mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00

Change-Id: I34eb993b562c77f56d8fbd51a02ee266c1f76678 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2017-2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
|
#include "shared/source/execution_environment/execution_environment.h"
|
|
|
|
#include "opencl/source/platform/platform.h"
|
|
#include "opencl/test/unit_test/helpers/dispatch_flags_helper.h"
|
|
#include "test.h"
|
|
|
|
using namespace NEO;
|
|
|
|
typedef ::testing::Test Gen8CoherencyRequirements;
|
|
|
|
GEN8TEST_F(Gen8CoherencyRequirements, noCoherencyProgramming) {
|
|
ExecutionEnvironment *executionEnvironment = platform()->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());
|
|
}
|