mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Allow Device creating multiple CSRs [5/n]
- Move Engine type to OsContext - Move OsContext to CSR - Improve EngineMapper logic - CompletionStamp cleanup Change-Id: I935cb7169c8c48cd09837e20e3da06f6dd3437b9 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
9a89426ec1
commit
2d77b86e70
@@ -197,7 +197,7 @@ TEST_F(MemoryAllocatorTest, allocateSystemAligned) {
|
||||
TEST_F(MemoryAllocatorTest, allocateGraphics) {
|
||||
unsigned int alignment = 4096;
|
||||
|
||||
memoryManager->createAndRegisterOsContext();
|
||||
memoryManager->createAndRegisterOsContext(gpgpuEngineInstances[0]);
|
||||
auto allocation = memoryManager->allocateGraphicsMemory(sizeof(char));
|
||||
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
@@ -1226,7 +1226,7 @@ TEST_F(MemoryManagerWithCsrTest, givenAllocationThatWasUsedAndIsCompletedWhenche
|
||||
}
|
||||
|
||||
TEST_F(MemoryManagerWithCsrTest, givenAllocationThatWasUsedAndIsNotCompletedWhencheckGpuUsageAndDestroyGraphicsAllocationsIsCalledThenItIsAddedToTemporaryAllocationList) {
|
||||
memoryManager->createAndRegisterOsContext();
|
||||
memoryManager->createAndRegisterOsContext(gpgpuEngineInstances[0]);
|
||||
auto usedAllocationAndNotGpuCompleted = memoryManager->allocateGraphicsMemory(4096);
|
||||
|
||||
auto tagAddress = csr->getTagAddress();
|
||||
@@ -1398,7 +1398,7 @@ TEST(GraphicsAllocation, givenSharedHandleBasedConstructorWhenGraphicsAllocation
|
||||
TEST(ResidencyDataTest, givenOsContextWhenItIsRegisteredToMemoryManagerThenRefCountIncreases) {
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
MockMemoryManager memoryManager(false, false, executionEnvironment);
|
||||
memoryManager.createAndRegisterOsContext();
|
||||
memoryManager.createAndRegisterOsContext(gpgpuEngineInstances[0]);
|
||||
EXPECT_EQ(1u, memoryManager.getOsContextCount());
|
||||
EXPECT_EQ(1, memoryManager.registeredOsContexts[0]->getRefInternalCount());
|
||||
}
|
||||
@@ -1406,8 +1406,8 @@ TEST(ResidencyDataTest, givenOsContextWhenItIsRegisteredToMemoryManagerThenRefCo
|
||||
TEST(ResidencyDataTest, givenTwoOsContextsWhenTheyAreRegistredFromHigherToLowerThenProperSizeIsReturned) {
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
MockMemoryManager memoryManager(false, false, executionEnvironment);
|
||||
memoryManager.createAndRegisterOsContext();
|
||||
memoryManager.createAndRegisterOsContext();
|
||||
memoryManager.createAndRegisterOsContext(gpgpuEngineInstances[0]);
|
||||
memoryManager.createAndRegisterOsContext(gpgpuEngineInstances[1]);
|
||||
EXPECT_EQ(2u, memoryManager.getOsContextCount());
|
||||
EXPECT_EQ(1, memoryManager.registeredOsContexts[0]->getRefInternalCount());
|
||||
EXPECT_EQ(1, memoryManager.registeredOsContexts[1]->getRefInternalCount());
|
||||
@@ -1420,8 +1420,8 @@ TEST(ResidencyDataTest, givenResidencyDataWhenUpdateCompletionDataIsCalledThenIt
|
||||
|
||||
MockResidencyData residency;
|
||||
|
||||
OsContext osContext(nullptr, 0u);
|
||||
OsContext osContext2(nullptr, 1u);
|
||||
OsContext osContext(nullptr, 0u, gpgpuEngineInstances[0]);
|
||||
OsContext osContext2(nullptr, 1u, gpgpuEngineInstances[1]);
|
||||
|
||||
auto lastFenceValue = 45llu;
|
||||
auto lastFenceValue2 = 23llu;
|
||||
|
||||
Reference in New Issue
Block a user