Remove dcFlush parameter from finish call

Change-Id: Ifc808822399a100745a9d81bb5f6e45903a895fa
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-09-13 10:11:17 +02:00
committed by sys_ocldev
parent c0c6a46ece
commit 0337b58ee4
33 changed files with 56 additions and 68 deletions

View File

@@ -35,13 +35,11 @@ TYPED_TEST_P(D3DTests, givenSharedResourceBufferAndInteropUserSyncEnabledWhenRel
class MockCmdQ : public CommandQueue {
public:
MockCmdQ(Context *context, Device *device, const cl_queue_properties *properties) : CommandQueue(context, device, properties){};
cl_int finish(bool dcFlush) override {
cl_int finish() override {
finishCalled++;
dcFlushRequested = dcFlush;
return CL_SUCCESS;
}
uint32_t finishCalled = 0;
bool dcFlushRequested = false;
};
auto mockCmdQ = std::unique_ptr<MockCmdQ>(new MockCmdQ(this->context, this->context->getDevice(0), 0));
@@ -65,13 +63,11 @@ TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncDisabledWhe
class MockCmdQ : public CommandQueue {
public:
MockCmdQ(Context *context, Device *device, const cl_queue_properties *properties) : CommandQueue(context, device, properties){};
cl_int finish(bool dcFlush) override {
cl_int finish() override {
finishCalled++;
dcFlushRequested = dcFlush;
return CL_SUCCESS;
}
uint32_t finishCalled = 0;
bool dcFlushRequested = false;
};
auto mockCmdQ = std::unique_ptr<MockCmdQ>(new MockCmdQ(this->context, this->context->getDevice(0), 0));
@@ -87,7 +83,6 @@ TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncDisabledWhe
retVal = this->enqueueReleaseD3DObjectsApi(this->mockSharingFcns, mockCmdQ.get(), 1, &bufferMem, 0, nullptr, nullptr);
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(2u, mockCmdQ->finishCalled);
EXPECT_TRUE(mockCmdQ->dcFlushRequested);
}
TYPED_TEST_P(D3DTests, givenSharedResourceBufferAndInteropUserSyncDisabledWhenReleaseIsCalledThenDoExplicitFinishOnce) {
@@ -101,13 +96,11 @@ TYPED_TEST_P(D3DTests, givenSharedResourceBufferAndInteropUserSyncDisabledWhenRe
class MockCmdQ : public CommandQueue {
public:
MockCmdQ(Context *context, Device *device, const cl_queue_properties *properties) : CommandQueue(context, device, properties){};
cl_int finish(bool dcFlush) override {
cl_int finish() override {
finishCalled++;
dcFlushRequested = dcFlush;
return CL_SUCCESS;
}
uint32_t finishCalled = 0;
bool dcFlushRequested = false;
};
auto mockCmdQ = std::unique_ptr<MockCmdQ>(new MockCmdQ(this->context, this->context->getDevice(0), 0));
@@ -123,7 +116,6 @@ TYPED_TEST_P(D3DTests, givenSharedResourceBufferAndInteropUserSyncDisabledWhenRe
retVal = this->enqueueReleaseD3DObjectsApi(this->mockSharingFcns, mockCmdQ.get(), 1, &bufferMem, 0, nullptr, nullptr);
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(1u, mockCmdQ->finishCalled);
EXPECT_TRUE(mockCmdQ->dcFlushRequested);
}
TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncEnabledWhenReleaseIsCalledThenDoExplicitFinishOnce) {
@@ -132,13 +124,11 @@ TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncEnabledWhen
class MockCmdQ : public CommandQueue {
public:
MockCmdQ(Context *context, Device *device, const cl_queue_properties *properties) : CommandQueue(context, device, properties){};
cl_int finish(bool dcFlush) override {
cl_int finish() override {
finishCalled++;
dcFlushRequested = dcFlush;
return CL_SUCCESS;
}
uint32_t finishCalled = 0;
bool dcFlushRequested = false;
};
auto mockCmdQ = std::unique_ptr<MockCmdQ>(new MockCmdQ(this->context, this->context->getDevice(0), 0));
@@ -154,7 +144,6 @@ TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncEnabledWhen
retVal = this->enqueueReleaseD3DObjectsApi(this->mockSharingFcns, mockCmdQ.get(), 1, &bufferMem, 0, nullptr, nullptr);
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(1u, mockCmdQ->finishCalled);
EXPECT_TRUE(mockCmdQ->dcFlushRequested);
}
TYPED_TEST_P(D3DTests, givenSharedResourceFlagWhenCreate2dTextureThenStagingTextureEqualsPassedTexture) {
@@ -493,4 +482,4 @@ REGISTER_TYPED_TEST_CASE_P(D3DTests,
givenD3DTexture3dWhenOclImageIsCreatedThenSharedImageAllocationTypeIsSet);
INSTANTIATE_TYPED_TEST_CASE_P(D3DSharingTests, D3DTests, D3DTypes);
} // namespace NEO
} // namespace NEO