Files
compute-runtime/unit_tests/os_interface/linux/drm_mapper_tests.cpp
Dunajski, Bartosz 2d77b86e70 Allow Device creating multiple CSRs [5/n]
- Move Engine type to OsContext
- Move OsContext to CSR
- Improve EngineMapper logic
- CompletionStamp cleanup

Change-Id: I935cb7169c8c48cd09837e20e3da06f6dd3437b9
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-27 14:25:04 +01:00

23 lines
558 B
C++

/*
* Copyright (C) 2017-2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "drm/i915_drm.h"
#include "runtime/os_interface/linux/drm_engine_mapper.h"
#include "test.h"
using namespace OCLRT;
TEST(DrmMapperTests, engineNodeMapPass) {
unsigned int flag = DrmEngineMapper::engineNodeMap(EngineType::ENGINE_RCS);
unsigned int expected = I915_EXEC_RENDER;
EXPECT_EQ(expected, flag);
}
TEST(DrmMapperTests, engineNodeMapNegative) {
EXPECT_THROW(DrmEngineMapper::engineNodeMap(EngineType::ENGINE_BCS), std::exception);
}