mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Minor cleanup in buffer ULTs
Change-Id: I5004cbcb7b001a878de96449457bf43db1b23164 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
bf3d57dd05
commit
babbb1224f
@ -466,18 +466,12 @@ TEST_F(clCreateBufferTestsWithRestrictions, GivenMemoryManagerRestrictionsWhenMi
|
||||
|
||||
using clCreateBufferWithMultiDeviceContextTests = clCreateBufferTemplateTests;
|
||||
|
||||
static int cbInvoked = 0;
|
||||
void CL_CALLBACK eventCallBack(const char *, const void *,
|
||||
size_t, void *) {
|
||||
cbInvoked++;
|
||||
}
|
||||
|
||||
TEST_P(clCreateBufferWithMultiDeviceContextTests, GivenBufferCreatedWithContextdWithMultiDeviceThenGraphicsAllocationsAreProperlyFilled) {
|
||||
UltClDeviceFactory deviceFactory{2, 0};
|
||||
DebugManager.flags.EnableMultiRootDeviceContexts.set(true);
|
||||
|
||||
cl_device_id devices[] = {deviceFactory.rootDevices[0], deviceFactory.rootDevices[1]};
|
||||
auto context = clCreateContext(nullptr, 2u, devices, eventCallBack, nullptr, &retVal);
|
||||
auto context = clCreateContext(nullptr, 2u, devices, nullptr, nullptr, &retVal);
|
||||
EXPECT_NE(nullptr, context);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
|
@ -1812,10 +1812,7 @@ using MultiRootDeviceBufferTest = MultiRootDeviceFixture;
|
||||
TEST_F(MultiRootDeviceBufferTest, WhenCleanAllGraphicsAllocationsCalledThenGraphicsAllocationsAreProperlyRemoved) {
|
||||
std::map<uint32_t, NEO::CreateBuffer::AllocationInfo> allocationInfo;
|
||||
|
||||
for (auto rootDeviceIndex = 1u; rootDeviceIndex < 2u; rootDeviceIndex++) {
|
||||
allocationInfo.insert({rootDeviceIndex, {}});
|
||||
}
|
||||
|
||||
allocationInfo.insert({1u, {}});
|
||||
allocationInfo[1u].memory = mockMemoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{1u, MemoryConstants::pageSize});
|
||||
|
||||
Buffer::cleanAllGraphicsAllocations(*context, *context->getMemoryManager(), allocationInfo);
|
||||
|
Reference in New Issue
Block a user