mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 15:53:13 +08:00
23 lines
558 B
C++
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);
|
||
|
|
}
|