Files
compute-runtime/opencl/test/unit_test/sharings/va/va_device_tests.cpp
Slawomir Milczarek beeaae0e26 Add new VADevice class to handle clGetDeviceIDsFromVA_APIMediaAdapterINTEL
Related-To: NEO-5110

Change-Id: I72ec529313579959926a77ee91eb23c7c3bcbdbe
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2020-10-19 10:32:56 +02:00

26 lines
650 B
C++

/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/source/cl_device/cl_device.h"
#include "opencl/source/platform/platform.h"
#include "opencl/source/sharings/va/va_device.h"
#include "opencl/test/unit_test/fixtures/platform_fixture.h"
#include "test.h"
using namespace NEO;
using VaDeviceTests = Test<PlatformFixture>;
TEST_F(VaDeviceTests, givenVADeviceWhenGetDeviceFromVAIsCalledThenRootDeviceIsReturned) {
VADisplay vaDisplay = nullptr;
VADevice vaDevice{};
ClDevice *device = vaDevice.getDeviceFromVA(pPlatform, vaDisplay);
EXPECT_EQ(pPlatform->getClDevice(0), device);
}