fix: download staging buffer before reading from it

Related-To: NEO-14154

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2025-02-20 19:32:05 +00:00
committed by Compute-Runtime-Automation
parent 4acb573896
commit 01a66a9347
2 changed files with 11 additions and 1 deletions

View File

@@ -521,6 +521,16 @@ TEST_F(StagingBufferManagerTest, givenStagingBufferWhenPerformImageReadThenRegio
imageTransferThroughStagingBuffers(true, stagingBufferSize, globalOrigin, globalRegion, expectedChunks);
}
HWTEST_F(StagingBufferManagerTest, givenStagingBufferWhenPerformImageReadThenDownloadAllocationsCalledForAllReadChunks) {
size_t expectedChunks = 8;
const size_t globalOrigin[3] = {0, 0, 0};
const size_t globalRegion[3] = {4, expectedChunks, 1};
imageTransferThroughStagingBuffers(true, stagingBufferSize, globalOrigin, globalRegion, expectedChunks);
auto ultCsr = reinterpret_cast<UltCommandStreamReceiver<FamilyType> *>(csr);
EXPECT_EQ(expectedChunks, ultCsr->downloadAllocationsCalledCount);
EXPECT_TRUE(ultCsr->latestDownloadAllocationsBlocking);
}
TEST_F(StagingBufferManagerTest, givenStagingBufferWhenPerformImageReadThenWholeRegionCovered) {
size_t expectedChunks = 8;
const size_t globalOrigin[3] = {0, 0, 0};