mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:39:51 +08:00
Rename SHARED_RESOURCE allocation type to SHARED_RESOURCE_COPY
Change-Id: Ie846450384730171304788bbb1709d7f088036a8
This commit is contained in:
committed by
sys_ocldev
parent
d56daf1726
commit
c870628d08
@@ -24,7 +24,7 @@ TEST(MemoryManagerTest, givenNotSetUseSystemMemoryWhenGraphicsAllocationInDevice
|
||||
memoryManager.freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenImageOrSharedResourceWhenGraphicsAllocationInDevicePoolIsAllocatedThenNullptrIsReturned) {
|
||||
TEST(MemoryManagerTest, givenImageOrSharedResourceCopyWhenGraphicsAllocationInDevicePoolIsAllocatedThenNullptrIsReturned) {
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
OsAgnosticMemoryManager memoryManager(false, false, executionEnvironment);
|
||||
|
||||
@@ -34,7 +34,7 @@ TEST(MemoryManagerTest, givenImageOrSharedResourceWhenGraphicsAllocationInDevice
|
||||
allocData.flags.allocateMemory = true;
|
||||
|
||||
GraphicsAllocation::AllocationType types[] = {GraphicsAllocation::AllocationType::IMAGE,
|
||||
GraphicsAllocation::AllocationType::SHARED_RESOURCE};
|
||||
GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY};
|
||||
|
||||
for (uint32_t i = 0; i < arrayCount(types); i++) {
|
||||
allocData.type = types[i];
|
||||
|
||||
@@ -162,7 +162,7 @@ static const GraphicsAllocation::AllocationType allocationTypesWith32BitAnd64KbP
|
||||
GraphicsAllocation::AllocationType::TIMESTAMP_TAG_BUFFER,
|
||||
GraphicsAllocation::AllocationType::IMAGE,
|
||||
GraphicsAllocation::AllocationType::INSTRUCTION_HEAP,
|
||||
GraphicsAllocation::AllocationType::SHARED_RESOURCE};
|
||||
GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(Disallow32BitAnd64kbPagesTypes,
|
||||
MemoryManagerGetAlloctionData32BitAnd64kbPagesNotAllowedTest,
|
||||
|
||||
@@ -1144,7 +1144,7 @@ TEST(OsAgnosticMemoryManager, givenLocalMemorySupportedAndAubUsageWhenMemoryMana
|
||||
EXPECT_EQ(heap32Base, memoryManager.allocator32Bit->getBase());
|
||||
}
|
||||
|
||||
TEST(MemoryManager, givenSharedResourceWhenAllocatingGraphicsMemoryThenAllocateGraphicsMemoryForImageIsCalled) {
|
||||
TEST(MemoryManager, givenSharedResourceCopyWhenAllocatingGraphicsMemoryThenAllocateGraphicsMemoryForImageIsCalled) {
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
MockMemoryManager memoryManager(false, true, executionEnvironment);
|
||||
cl_image_desc imgDesc = {};
|
||||
@@ -1157,7 +1157,7 @@ TEST(MemoryManager, givenSharedResourceWhenAllocatingGraphicsMemoryThenAllocateG
|
||||
|
||||
MockMemoryManager::AllocationData allocationData;
|
||||
allocationData.imgInfo = &imgInfo;
|
||||
allocationData.type = GraphicsAllocation::AllocationType::SHARED_RESOURCE;
|
||||
allocationData.type = GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY;
|
||||
|
||||
auto imageAllocation = memoryManager.allocateGraphicsMemory(allocationData);
|
||||
EXPECT_NE(nullptr, imageAllocation);
|
||||
|
||||
@@ -888,7 +888,7 @@ AllocationTypeTestCase allocationTypeValues[] = {
|
||||
{OCLRT::GraphicsAllocation::AllocationType::INDIRECT_OBJECT_HEAP, "INDIRECT_OBJECT_HEAP"},
|
||||
{OCLRT::GraphicsAllocation::AllocationType::SURFACE_STATE_HEAP, "SURFACE_STATE_HEAP"},
|
||||
{OCLRT::GraphicsAllocation::AllocationType::DYNAMIC_STATE_HEAP, "DYNAMIC_STATE_HEAP"},
|
||||
{OCLRT::GraphicsAllocation::AllocationType::SHARED_RESOURCE, "SHARED_RESOURCE"},
|
||||
{OCLRT::GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY, "SHARED_RESOURCE_COPY"},
|
||||
{OCLRT::GraphicsAllocation::AllocationType::SVM, "SVM"},
|
||||
{OCLRT::GraphicsAllocation::AllocationType::UNDECIDED, "UNDECIDED"}};
|
||||
|
||||
|
||||
@@ -3076,7 +3076,7 @@ TEST_F(DrmMemoryManagerTest, givenDisabledHostPtrTrackingWhenAllocateGraphicsMem
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST_F(DrmMemoryManagerTest, givenImageOrSharedResourceWhenGraphicsAllocationInDevicePoolIsAllocatedThenNullptrIsReturned) {
|
||||
TEST_F(DrmMemoryManagerTest, givenImageOrSharedResourceCopyWhenGraphicsAllocationInDevicePoolIsAllocatedThenNullptrIsReturned) {
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
std::unique_ptr<TestedDrmMemoryManager> memoryManager(new (std::nothrow) TestedDrmMemoryManager(Drm::get(0), false, false, executionEnvironment));
|
||||
|
||||
@@ -3086,7 +3086,7 @@ TEST_F(DrmMemoryManagerTest, givenImageOrSharedResourceWhenGraphicsAllocationInD
|
||||
allocData.flags.allocateMemory = true;
|
||||
|
||||
GraphicsAllocation::AllocationType types[] = {GraphicsAllocation::AllocationType::IMAGE,
|
||||
GraphicsAllocation::AllocationType::SHARED_RESOURCE};
|
||||
GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY};
|
||||
|
||||
for (uint32_t i = 0; i < arrayCount(types); i++) {
|
||||
allocData.type = types[i];
|
||||
|
||||
Reference in New Issue
Block a user