11/*
2- * Copyright (C) 2017-2018 Intel Corporation
2+ * Copyright (C) 2017-2019 Intel Corporation
33 *
44 * SPDX-License-Identifier: MIT
55 *
@@ -45,11 +45,13 @@ void AubWriteCopyReadBuffer::runTest() {
4545 retVal));
4646 ASSERT_NE (nullptr , dstBuffer);
4747
48- aubCsr->writeMemory (*srcBuffer->getGraphicsAllocation ());
49- aubCsr->writeMemory (*dstBuffer->getGraphicsAllocation ());
48+ if (aubCsr) {
49+ aubCsr->writeMemory (*srcBuffer->getGraphicsAllocation ());
50+ aubCsr->writeMemory (*dstBuffer->getGraphicsAllocation ());
5051
51- getAubCsr<FamilyType>()->expectMemoryEqual (AUBFixture::getGpuPointer (srcBuffer->getGraphicsAllocation ()), srcMemoryInitial, bufferSize);
52- getAubCsr<FamilyType>()->expectMemoryEqual (AUBFixture::getGpuPointer (dstBuffer->getGraphicsAllocation ()), dstMemoryInitial, bufferSize);
52+ aubCsr->expectMemoryEqual (AUBFixture::getGpuPointer (srcBuffer->getGraphicsAllocation ()), srcMemoryInitial, bufferSize);
53+ aubCsr->expectMemoryEqual (AUBFixture::getGpuPointer (dstBuffer->getGraphicsAllocation ()), dstMemoryInitial, bufferSize);
54+ }
5355
5456 cl_uint numEventsInWaitList = 0 ;
5557 cl_event *eventWaitList = nullptr ;
@@ -79,8 +81,10 @@ void AubWriteCopyReadBuffer::runTest() {
7981
8082 EXPECT_EQ (CL_SUCCESS, retVal);
8183
82- getAubCsr<FamilyType>()->expectMemoryEqual (AUBFixture::getGpuPointer (srcBuffer->getGraphicsAllocation ()), srcMemoryToWrite, bufferSize);
83- getAubCsr<FamilyType>()->expectMemoryEqual (AUBFixture::getGpuPointer (dstBuffer->getGraphicsAllocation ()), dstMemoryToWrite, bufferSize);
84+ if (aubCsr) {
85+ aubCsr->expectMemoryEqual (AUBFixture::getGpuPointer (srcBuffer->getGraphicsAllocation ()), srcMemoryToWrite, bufferSize);
86+ aubCsr->expectMemoryEqual (AUBFixture::getGpuPointer (dstBuffer->getGraphicsAllocation ()), dstMemoryToWrite, bufferSize);
87+ }
8488
8589 retVal = pCmdQ->enqueueCopyBuffer (
8690 srcBuffer.get (),
@@ -96,8 +100,10 @@ void AubWriteCopyReadBuffer::runTest() {
96100
97101 pCmdQ->flush ();
98102
99- // Destination buffer should have src buffer content
100- getAubCsr<FamilyType>()->expectMemoryEqual (AUBFixture::getGpuPointer (dstBuffer->getGraphicsAllocation ()), srcMemoryToWrite, bufferSize);
103+ if (aubCsr) {
104+ // Destination buffer should have src buffer content
105+ aubCsr->expectMemoryEqual (AUBFixture::getGpuPointer (dstBuffer->getGraphicsAllocation ()), srcMemoryToWrite, bufferSize);
106+ }
101107
102108 char hostPtrMemory[] = {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
103109 ASSERT_EQ (bufferSize, sizeof (hostPtrMemory));
@@ -119,7 +125,9 @@ void AubWriteCopyReadBuffer::runTest() {
119125 allocation = allocation->next ;
120126 }
121127
122- getAubCsr<FamilyType>()->expectMemoryEqual (AUBFixture::getGpuPointer (allocation), srcMemoryToWrite, bufferSize);
128+ if (aubCsr) {
129+ aubCsr->expectMemoryEqual (AUBFixture::getGpuPointer (allocation), srcMemoryToWrite, bufferSize);
130+ }
123131}
124132
125133HWTEST_F (AubWriteCopyReadBuffer, givenTwoBuffersFilledWithPatternWhenSourceIsCopiedToDestinationThenDestinationDataValidates) {
0 commit comments