compute-runtime/shared/test/unit_test/os_interface/windows/wddm_tests.cpp

29 lines
691 B
C++

/*
* Copyright (C) 2018-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gmm_helper/gmm.h"
#include "opencl/test/unit_test/os_interface/windows/wddm_fixture.h"
#include "test.h"
namespace NEO {
using WddmTests = WddmTestWithMockGdiDll;
TEST_F(WddmTests, whenCreatingAllocation64kThenDoNotCreateResource) {
init();
D3DKMT_HANDLE handle;
Gmm gmm(executionEnvironment->rootDeviceEnvironments[0]->getGmmClientContext(), nullptr, 20, false, true, true, {});
EXPECT_TRUE(wddm->createAllocation64k(&gmm, handle));
auto gdiParam = getMockAllocationFcn();
EXPECT_EQ(FALSE, gdiParam->Flags.CreateResource);
}
} // namespace NEO