Do not create shareable 64k paged allocations

Change-Id: I25620848533dbe96172e8582b64a53655c3e7d0e
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
Resolves: NEO-4720
This commit is contained in:
Maciej Dziuban 2020-06-30 16:44:12 +02:00 committed by sys_ocldev
parent 6dd07bd3bc
commit 79821f5d76
3 changed files with 30 additions and 1 deletions

View File

@ -499,7 +499,7 @@ bool Wddm::createAllocation64k(const Gmm *gmm, D3DKMT_HANDLE &outHandle) {
CreateAllocation.NumAllocations = 1;
CreateAllocation.pPrivateRuntimeData = NULL;
CreateAllocation.pPrivateDriverData = NULL;
CreateAllocation.Flags.CreateResource = TRUE;
CreateAllocation.Flags.CreateResource = FALSE;
CreateAllocation.pAllocationInfo = &AllocationInfo;
CreateAllocation.hDevice = device;

View File

@ -11,6 +11,7 @@ set(NEO_CORE_OS_INTERFACE_TESTS_WINDOWS
${CMAKE_CURRENT_SOURCE_DIR}/mock_gdi_interface.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mock_gdi_interface.h
${CMAKE_CURRENT_SOURCE_DIR}/wddm_preemption_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wddm_tests.cpp
)
set_property(GLOBAL PROPERTY NEO_CORE_OS_INTERFACE_TESTS_WINDOWS ${NEO_CORE_OS_INTERFACE_TESTS_WINDOWS})

View File

@ -0,0 +1,28 @@
/*
* 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