mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
performance: enable staging for 3d images
Related-To: NEO-14026 Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3010af596e
commit
f1b789cbb1
@@ -201,6 +201,7 @@ bool CommandQueue::isValidForStagingTransfer(MemObj *memObj, const void *ptr, si
|
|||||||
return isValidForStaging && !this->bufferCpuCopyAllowed(castToObject<Buffer>(memObj), commandType, isBlocking, size, const_cast<void *>(ptr), 0, nullptr);
|
return isValidForStaging && !this->bufferCpuCopyAllowed(castToObject<Buffer>(memObj), commandType, isBlocking, size, const_cast<void *>(ptr), 0, nullptr);
|
||||||
case CL_MEM_OBJECT_IMAGE1D:
|
case CL_MEM_OBJECT_IMAGE1D:
|
||||||
case CL_MEM_OBJECT_IMAGE2D:
|
case CL_MEM_OBJECT_IMAGE2D:
|
||||||
|
case CL_MEM_OBJECT_IMAGE3D:
|
||||||
return isValidForStaging;
|
return isValidForStaging;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -826,9 +826,10 @@ HWTEST_F(EnqueueWriteImageTest, whenisValidForStagingTransferCalledThenReturnCor
|
|||||||
|
|
||||||
image.reset(Image2dHelper<>::create(context));
|
image.reset(Image2dHelper<>::create(context));
|
||||||
EXPECT_EQ(isStagingBuffersEnabled, pCmdQ->isValidForStagingTransfer(image.get(), ptr, image->getSize(), CL_COMMAND_WRITE_IMAGE, false, false));
|
EXPECT_EQ(isStagingBuffersEnabled, pCmdQ->isValidForStagingTransfer(image.get(), ptr, image->getSize(), CL_COMMAND_WRITE_IMAGE, false, false));
|
||||||
|
pCmdQ->finish();
|
||||||
|
|
||||||
image.reset(Image3dHelper<>::create(context));
|
image.reset(Image3dHelper<>::create(context));
|
||||||
EXPECT_FALSE(pCmdQ->isValidForStagingTransfer(image.get(), ptr, image->getSize(), CL_COMMAND_WRITE_IMAGE, false, false));
|
EXPECT_EQ(isStagingBuffersEnabled, pCmdQ->isValidForStagingTransfer(image.get(), ptr, image->getSize(), CL_COMMAND_WRITE_IMAGE, false, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct WriteImageStagingBufferTest : public EnqueueWriteImageTest {
|
struct WriteImageStagingBufferTest : public EnqueueWriteImageTest {
|
||||||
|
|||||||
Reference in New Issue
Block a user