Remove default parameters from setArgSvm function.

Change-Id: I4408ddedfca464d56e24c4daa0c8c7b73791d6a0
This commit is contained in:
Mrozek, Michal
2019-01-28 10:24:11 +01:00
committed by sys_ocldev
parent c0d4122c26
commit f6ceb8fb4f
10 changed files with 34 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -378,7 +378,7 @@ struct AUBSimpleArgNonUniformFixture : public KernelAUBFixture<SimpleArgNonUnifo
memset(expectedMemory, 0x0, sizeUserMemory);
kernel->setArgSvm(1, sizeUserMemory, destMemory);
kernel->setArgSvm(1, sizeUserMemory, destMemory, nullptr, 0u);
outBuffer = createHostPtrAllocationFromSvmPtr(destMemory, sizeUserMemory);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -76,7 +76,7 @@ struct SimpleArgFixture : public FixtureFactory::IndirectHeapFixture,
memset(pExpectedMemory, 0x22, sizeUserMemory);
pKernel->setArg(0, sizeof(int), &argVal);
pKernel->setArgSvm(1, sizeUserMemory, pDestMemory);
pKernel->setArgSvm(1, sizeUserMemory, pDestMemory, nullptr, 0u);
outBuffer = AUBCommandStreamFixture::createResidentAllocationAndStoreItInCsr(pDestMemory, sizeUserMemory);
ASSERT_NE(nullptr, outBuffer);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -878,7 +878,7 @@ TEST_F(DispatchInfoBuilderTest, setKernelArg) {
EXPECT_EQ(CL_SUCCESS, diBuilder->setArg(0, sizeof(cl_mem *), pVal));
char data[128];
void *svmPtr = &data;
EXPECT_EQ(CL_SUCCESS, diBuilder->setArgSvm(1, sizeof(svmPtr), svmPtr));
EXPECT_EQ(CL_SUCCESS, diBuilder->setArgSvm(1, sizeof(svmPtr), svmPtr, nullptr, 0u));
MockGraphicsAllocation svmAlloc(svmPtr, 128);
EXPECT_EQ(CL_SUCCESS, diBuilder->setArgSvmAlloc(2, svmPtr, &svmAlloc));
@@ -945,17 +945,17 @@ TEST_F(DispatchInfoBuilderTest, SetArgSplit) {
//Set arg SVM
clearCrossThreadData();
builder1D.setArgSvm(SplitDispatch::RegionCoordX::Left, 1, sizeof(svmPtr), svmPtr);
builder1D.setArgSvm(SplitDispatch::RegionCoordX::Left, 1, sizeof(svmPtr), svmPtr, nullptr, 0u);
for (auto &dispatchInfo : mdi1D) {
EXPECT_EQ(svmPtr, *(reinterpret_cast<void **>(dispatchInfo.getKernel()->getCrossThreadData() + 0x30)));
}
clearCrossThreadData();
builder2D.setArgSvm(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, 1, sizeof(svmPtr), svmPtr);
builder2D.setArgSvm(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, 1, sizeof(svmPtr), svmPtr, nullptr, 0u);
for (auto &dispatchInfo : mdi2D) {
EXPECT_EQ(svmPtr, *(reinterpret_cast<void **>(dispatchInfo.getKernel()->getCrossThreadData() + 0x30)));
}
clearCrossThreadData();
builder3D.setArgSvm(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, SplitDispatch::RegionCoordZ::Front, 1, sizeof(svmPtr), svmPtr);
builder3D.setArgSvm(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, SplitDispatch::RegionCoordZ::Front, 1, sizeof(svmPtr), svmPtr, nullptr, 0u);
for (auto &dispatchInfo : mdi3D) {
EXPECT_EQ(svmPtr, *(reinterpret_cast<void **>(dispatchInfo.getKernel()->getCrossThreadData() + 0x30)));
}
@@ -978,7 +978,7 @@ TEST_F(DispatchInfoBuilderTest, setKernelArgNegative) {
diBuilder->bake(multiDispatchInfo);
EXPECT_NE(CL_SUCCESS, diBuilder->setArg(0, sizeof(cl_mem *), pVal));
EXPECT_EQ(CL_SUCCESS, diBuilder->setArgSvm(1, sizeof(void *), nullptr));
EXPECT_EQ(CL_SUCCESS, diBuilder->setArgSvm(1, sizeof(void *), nullptr, nullptr, 0u));
delete diBuilder;
delete[] buffer;
@@ -1000,7 +1000,7 @@ TEST_F(DispatchInfoBuilderTest, setKernelArgNullKernel) {
diBuilder->bake(multiDispatchInfo);
EXPECT_EQ(CL_SUCCESS, diBuilder->setArg(0, sizeof(cl_mem *), pVal));
EXPECT_EQ(CL_SUCCESS, diBuilder->setArgSvm(1, sizeof(svmPtr), svmPtr));
EXPECT_EQ(CL_SUCCESS, diBuilder->setArgSvm(1, sizeof(svmPtr), svmPtr, nullptr, 0u));
EXPECT_EQ(CL_SUCCESS, diBuilder->setArgSvmAlloc(2, svmPtr, &svmAlloc));
delete diBuilder;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -420,7 +420,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CloneKernelTest, cloneKernelWithArgDeviceQueue) {
TEST_F(CloneKernelTest, cloneKernelWithArgSvm) {
char *svmPtr = new char[256];
retVal = pSourceKernel->setArgSvm(0, 256, svmPtr);
retVal = pSourceKernel->setArgSvm(0, 256, svmPtr, nullptr, 0u);
ASSERT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(1u, pSourceKernel->getKernelArguments().size());

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -82,7 +82,7 @@ typedef Test<KernelArgSvmFixture_> KernelArgSvmTest;
TEST_F(KernelArgSvmTest, SetKernelArgValidSvmPtr) {
char *svmPtr = new char[256];
auto retVal = pKernel->setArgSvm(0, 256, svmPtr);
auto retVal = pKernel->setArgSvm(0, 256, svmPtr, nullptr, 0u);
EXPECT_EQ(CL_SUCCESS, retVal);
auto pKernelArg = (void **)(pKernel->getCrossThreadData() +
@@ -98,7 +98,7 @@ TEST_F(KernelArgSvmTest, SetKernelArgValidSvmPtrStateless) {
pKernelInfo->usesSsh = false;
pKernelInfo->requiresSshForBuffers = false;
auto retVal = pKernel->setArgSvm(0, 256, svmPtr);
auto retVal = pKernel->setArgSvm(0, 256, svmPtr, nullptr, 0u);
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(0u, pKernel->getSurfaceStateHeapSize());
@@ -112,7 +112,7 @@ HWTEST_F(KernelArgSvmTest, SetKernelArgValidSvmPtrStateful) {
pKernelInfo->usesSsh = true;
pKernelInfo->requiresSshForBuffers = true;
auto retVal = pKernel->setArgSvm(0, 256, svmPtr);
auto retVal = pKernel->setArgSvm(0, 256, svmPtr, nullptr, 0u);
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_NE(0u, pKernel->getSurfaceStateHeapSize());
@@ -317,7 +317,7 @@ class KernelArgSvmTestTyped : public KernelArgSvmTest {
struct SetArgHandlerSetArgSvm {
static void setArg(Kernel &kernel, uint32_t argNum, void *ptrToPatch, size_t allocSize, GraphicsAllocation &alloc) {
kernel.setArgSvm(argNum, allocSize, ptrToPatch, &alloc);
kernel.setArgSvm(argNum, allocSize, ptrToPatch, &alloc, 0u);
}
static constexpr bool supportsOffsets() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -77,11 +77,11 @@ TEST_F(PatchedKernelTest, givenKernelWithAllArgsSetWithSvmWhenIsPatchedIsCalledT
uint32_t size = sizeof(int);
auto argsNum = kernel->getKernelArgsNumber();
for (uint32_t i = 0; i < argsNum; i++) {
kernel->setArgSvm(0, size, nullptr, nullptr);
kernel->setArgSvm(0, size, nullptr, nullptr, 0u);
}
EXPECT_FALSE(kernel->isPatched());
for (uint32_t i = 0; i < argsNum; i++) {
kernel->setArgSvm(i, size, nullptr, nullptr);
kernel->setArgSvm(i, size, nullptr, nullptr, 0u);
}
EXPECT_TRUE(kernel->isPatched());
}
@@ -97,7 +97,7 @@ TEST_F(PatchedKernelTest, givenKernelWithOneArgumentToPatchWhichIsNonzeroIndexed
kernel.reset(mockKernel.mockKernel);
kernel->initialize();
EXPECT_FALSE(kernel->Kernel::isPatched());
kernel->setArgSvm(1, size, nullptr, nullptr);
kernel->setArgSvm(1, size, nullptr, nullptr, 0u);
EXPECT_TRUE(kernel->Kernel::isPatched());
kernel.release();
}