/* * Copyright (C) 2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/command_stream/stream_properties.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/unit_test/command_stream/stream_properties_tests_common.h" #include "test.h" namespace NEO { std::vector getAllStateComputeModeProperties(StateComputeModeProperties &properties) { std::vector allProperties; allProperties.push_back(&properties.isCoherencyRequired); allProperties.push_back(&properties.largeGrfMode); return allProperties; } std::vector getAllFrontEndProperties(FrontEndProperties &properties) { std::vector allProperties; allProperties.push_back(&properties.disableOverdispatch); allProperties.push_back(&properties.singleSliceDispatchCcsMode); return allProperties; } } // namespace NEO using namespace NEO; TEST(StreamPropertiesTests, whenSettingCooperativeKernelPropertiesThenCorrectValueIsSet) { StreamProperties properties; for (auto isEngineInstanced : ::testing::Bool()) { for (auto disableOverdispatch : ::testing::Bool()) { properties.frontEndState.setProperties(false, disableOverdispatch, isEngineInstanced, *defaultHwInfo); EXPECT_EQ(disableOverdispatch, properties.frontEndState.disableOverdispatch.value); EXPECT_EQ(isEngineInstanced, properties.frontEndState.singleSliceDispatchCcsMode.value); } } }