Use default graphics allocation

Change-Id: Iad369f4cd362ed1330440887dc9b6789dcd0b95d
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2020-08-18 11:09:12 +02:00
committed by sys_ocldev
parent 867b3d5492
commit 2f4b132722
2 changed files with 3 additions and 3 deletions

View File

@ -132,8 +132,8 @@ cl_int MemObj::getMemObjectInfo(cl_mem_info paramName,
cl_mem clAssociatedMemObject = static_cast<cl_mem>(this->associatedMemObject);
cl_context ctx = nullptr;
uint64_t internalHandle = 0llu;
auto allocation = getGraphicsAllocation(0);
cl_bool usesCompression = allocation && allocation->getAllocationType() == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED;
auto allocation = getMultiGraphicsAllocation().getDefaultGraphicsAllocation();
cl_bool usesCompression = allocation->getAllocationType() == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED;
switch (paramName) {
case CL_MEM_TYPE:

View File

@ -327,7 +327,7 @@ TEST_F(GetMemObjectInfo, GivenMemReferenceCountWhenGettingMemObjectInfoThenCorre
TEST_F(GetMemObjectInfo, GivenValidBufferWhenGettingCompressionOfMemObjectThenCorrectValueIsReturned) {
auto buffer = std::unique_ptr<Buffer>(BufferHelper<>::create());
auto graphicsAllocation = buffer->getGraphicsAllocation(0);
auto graphicsAllocation = buffer->getMultiGraphicsAllocation().getDefaultGraphicsAllocation();
size_t sizeReturned = 0;
cl_bool usesCompression{};