Change the type for CL_MEM_ALLOC_HOST_PTR buffers in 64 bit.

Change-Id: Ic70d8bb3e172b80b7c20b570e5e307be460defce
This commit is contained in:
Mrozek, Michal
2019-01-08 07:55:15 +01:00
committed by sys_ocldev
parent 639c14581c
commit 5c9f8eee23
2 changed files with 9 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -311,10 +311,14 @@ TEST(Buffer, givenUseHostPtrFlagWhenAllocationTypeIsQueriedThenBufferHostMemoryT
EXPECT_EQ(GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY, type);
}
TEST(Buffer, givenAllocHostPtrFlagWhenAllocationTypeIsQueriedThenBufferHostMemoryTypeIsReturned) {
TEST(Buffer, givenAllocHostPtrFlagWhenAllocationTypeIsQueriedThenBufferTypeIsReturned) {
cl_mem_flags flags = CL_MEM_ALLOC_HOST_PTR;
auto type = MockPublicAccessBuffer::getGraphicsAllocationType(flags, false, false);
EXPECT_EQ(GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY, type);
if (is64bit) {
EXPECT_EQ(GraphicsAllocation::AllocationType::BUFFER, type);
} else {
EXPECT_EQ(GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY, type);
}
}
TEST(Buffer, givenUseHostPtrFlagAndRenderCompressedBuffersEnabledWhenAllocationTypeIsQueriedThenBufferHostMemoryTypeIsReturned) {