mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
performance: enable image writes through staging chunks
Related-To: NEO-12968 Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fde3b36125
commit
1199e19df5
@@ -806,13 +806,14 @@ HWTEST_F(EnqueueWriteImageTest, whenIsValidForStagingWriteImageCalledThenReturnC
|
||||
if (!svmSupported) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
auto isStagingBuffersEnabled = pDevice->getProductHelper().isStagingBuffersEnabled();
|
||||
unsigned char ptr[16];
|
||||
|
||||
std::unique_ptr<Image> image(Image1dHelper<>::create(context));
|
||||
EXPECT_FALSE(pCmdQ->isValidForStagingWriteImage(image.get(), ptr, false));
|
||||
EXPECT_EQ(isStagingBuffersEnabled, pCmdQ->isValidForStagingWriteImage(image.get(), ptr, false));
|
||||
|
||||
image.reset(Image2dHelper<>::create(context));
|
||||
EXPECT_FALSE(pCmdQ->isValidForStagingWriteImage(image.get(), ptr, false));
|
||||
EXPECT_EQ(isStagingBuffersEnabled, pCmdQ->isValidForStagingWriteImage(image.get(), ptr, false));
|
||||
|
||||
image.reset(Image3dHelper<>::create(context));
|
||||
EXPECT_FALSE(pCmdQ->isValidForStagingWriteImage(image.get(), ptr, false));
|
||||
|
||||
@@ -197,7 +197,7 @@ bool StagingBufferManager::isValidForCopy(const Device &device, void *dstPtr, co
|
||||
}
|
||||
|
||||
bool StagingBufferManager::isValidForStagingWriteImage(const Device &device, const void *ptr, bool hasDependencies) const {
|
||||
auto stagingCopyEnabled = false;
|
||||
auto stagingCopyEnabled = device.getProductHelper().isStagingBuffersEnabled();
|
||||
if (debugManager.flags.EnableCopyWithStagingBuffers.get() != -1) {
|
||||
stagingCopyEnabled = debugManager.flags.EnableCopyWithStagingBuffers.get();
|
||||
}
|
||||
|
||||
@@ -186,7 +186,8 @@ TEST_F(StagingBufferManagerTest, givenStagingBufferEnabledWhenValidForImageWrite
|
||||
EXPECT_FALSE(stagingBufferManager->isValidForStagingWriteImage(*pDevice, nonUsmBuffer, false));
|
||||
|
||||
debugManager.flags.EnableCopyWithStagingBuffers.set(-1);
|
||||
EXPECT_FALSE(stagingBufferManager->isValidForStagingWriteImage(*pDevice, nonUsmBuffer, false));
|
||||
auto isStaingBuffersEnabled = pDevice->getProductHelper().isStagingBuffersEnabled();
|
||||
EXPECT_EQ(isStaingBuffersEnabled, stagingBufferManager->isValidForStagingWriteImage(*pDevice, nonUsmBuffer, false));
|
||||
svmAllocsManager->freeSVMAlloc(usmBuffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user