Skip to content

Commit 5f9dbef

Browse files
Pass alignment to Gmm
Related-To: NEO-5750 Signed-off-by: Maciej Dziuban <[email protected]>
1 parent a3e86f9 commit 5f9dbef

28 files changed

+108
-98
lines changed

opencl/test/unit_test/built_ins/built_in_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ HWTEST2_P(AuxBuiltInTests, givenAuxToNonAuxTranslationWhenSettingSurfaceStateThe
616616
std::unique_ptr<Buffer> buffer = nullptr;
617617
std::unique_ptr<GraphicsAllocation> gfxAllocation = nullptr;
618618

619-
auto gmm = std::unique_ptr<Gmm>(new Gmm(pDevice->getGmmClientContext(), nullptr, 1, false));
619+
auto gmm = std::unique_ptr<Gmm>(new Gmm(pDevice->getGmmClientContext(), nullptr, 1, 0, false));
620620
gmm->isRenderCompressed = true;
621621

622622
if (kernelObjType == MockKernelObjForAuxTranslation::Type::MEM_OBJ) {
@@ -672,7 +672,7 @@ HWTEST2_P(AuxBuiltInTests, givenNonAuxToAuxTranslationWhenSettingSurfaceStateThe
672672
builtinOpParams.auxTranslationDirection = AuxTranslationDirection::NonAuxToAux;
673673

674674
MockKernelObjForAuxTranslation mockKernelObjForAuxTranslation(kernelObjType);
675-
auto gmm = std::unique_ptr<Gmm>(new Gmm(pDevice->getGmmClientContext(), nullptr, 1, false));
675+
auto gmm = std::unique_ptr<Gmm>(new Gmm(pDevice->getGmmClientContext(), nullptr, 1, 0, false));
676676
gmm->isRenderCompressed = true;
677677
if (kernelObjType == MockKernelObjForAuxTranslation::Type::MEM_OBJ) {
678678
mockKernelObjForAuxTranslation.mockBuffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->setDefaultGmm(gmm.get());

opencl/test/unit_test/command_queue/read_write_buffer_cpu_copy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, givenRenderCompressedGmmWhenAskingForCpuOpe
2323
cl_int retVal;
2424
auto rootDeviceIndex = context->getDevice(0)->getRootDeviceIndex();
2525
std::unique_ptr<Buffer> buffer(Buffer::create(context, CL_MEM_READ_WRITE, 1, nullptr, retVal));
26-
auto gmm = new Gmm(pDevice->getGmmClientContext(), nullptr, 1, false);
26+
auto gmm = new Gmm(pDevice->getGmmClientContext(), nullptr, 1, 0, false);
2727
gmm->isRenderCompressed = false;
2828
auto allocation = buffer->getGraphicsAllocation(rootDeviceIndex);
2929
allocation->setDefaultGmm(gmm);

opencl/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMe
719719
auto gfxAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), MemoryConstants::pageSize});
720720
aubCsr->setAubWritable(true, *gfxAllocation);
721721

722-
auto gmm = new Gmm(pDevice->getGmmClientContext(), nullptr, 1, false);
722+
auto gmm = new Gmm(pDevice->getGmmClientContext(), nullptr, 1, 0, false);
723723
gfxAllocation->setDefaultGmm(gmm);
724724

725725
for (bool compressed : {false, true}) {

opencl/test/unit_test/context/driver_diagnostics_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ TEST_F(PerformanceHintTest, givenCompressedImageWhenItsCreatedThenProperPerforma
654654
auto mockBuffer = std::unique_ptr<MockBuffer>(new MockBuffer());
655655
StorageInfo info;
656656
size_t t = 4;
657-
auto gmm = std::unique_ptr<Gmm>(new Gmm(device->getGmmClientContext(), static_cast<const void *>(nullptr), t, false, true, true, info));
657+
auto gmm = std::unique_ptr<Gmm>(new Gmm(device->getGmmClientContext(), static_cast<const void *>(nullptr), t, 0, false, true, true, info));
658658
gmm->isRenderCompressed = true;
659659

660660
mockBuffer->getGraphicsAllocation(device->getRootDeviceIndex())->setDefaultGmm(gmm.get());
@@ -774,7 +774,7 @@ TEST_F(PerformanceHintTest, givenUncompressedImageWhenItsCreatedThenProperPerfor
774774
auto mockBuffer = std::unique_ptr<MockBuffer>(new MockBuffer());
775775
StorageInfo info;
776776
size_t t = 4;
777-
auto gmm = std::unique_ptr<Gmm>(new Gmm(device->getGmmClientContext(), (const void *)nullptr, t, false, true, true, info));
777+
auto gmm = std::unique_ptr<Gmm>(new Gmm(device->getGmmClientContext(), (const void *)nullptr, t, 0, false, true, true, info));
778778
gmm->isRenderCompressed = false;
779779

780780
mockBuffer->getGraphicsAllocation(device->getRootDeviceIndex())->setDefaultGmm(gmm.get());

opencl/test/unit_test/fixtures/windows/memory_allocator_multi_device_fixture_windows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void MemoryAllocatorMultiDeviceSystemSpecificFixture::SetUp(ExecutionEnvironment
2525
auto osEnvironment = new OsEnvironmentWin();
2626
osEnvironment->gdi.reset(gdi);
2727
for (auto i = 0u; i < executionEnvironment.rootDeviceEnvironments.size(); i++) {
28-
gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[i]->getGmmClientContext(), nullptr, 0, false);
28+
gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[i]->getGmmClientContext(), nullptr, 0, 0, false);
2929
auto wddm = static_cast<WddmMock *>(executionEnvironment.rootDeviceEnvironments[i]->osInterface->get()->getWddm());
3030
wddm->hwDeviceId = std::make_unique<HwDeviceId>(ADAPTER_HANDLE, LUID{}, osEnvironment);
3131
wddm->callBaseMapGpuVa = false;

opencl/test/unit_test/gen12lp/image_tests_gen12lp.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ GEN12LPTEST_F(ImageClearColorFixture, givenMcsAllocationWhenSetArgIsCalledWithUn
9595

9696
auto surfaceState = FamilyType::cmdInitRenderSurfaceState;
9797
auto imageHw = static_cast<ImageHw<FamilyType> *>(image.get());
98-
mcsAlloc->setDefaultGmm(new Gmm(context->getDevice(0)->getGmmClientContext(), nullptr, 1, false));
98+
mcsAlloc->setDefaultGmm(new Gmm(context->getDevice(0)->getGmmClientContext(), nullptr, 1, 0, false));
9999
surfaceState.setSurfaceBaseAddress(0xABCDEF1000);
100100
imageHw->setMcsSurfaceInfo(msi);
101101
imageHw->setMcsAllocation(mcsAlloc);

opencl/test/unit_test/gmm_helper/gmm_helper_tests.cpp

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ TEST(GmmGlTests, givenGmmWhenAskedforCubeFaceIndexThenProperValueIsReturned) {
7171
TEST_F(GmmTests, WhenGmmIsCreatedThenAllResourceAreCreated) {
7272
std::unique_ptr<MemoryManager> mm(new MemoryManagerCreate<OsAgnosticMemoryManager>(false, false, *executionEnvironment));
7373
void *pSysMem = mm->allocateSystemMemory(4096, 4096);
74-
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), pSysMem, 4096, false));
74+
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), pSysMem, 4096, 0, false));
7575

7676
ASSERT_TRUE(gmm->gmmResourceInfo.get() != nullptr);
7777

@@ -86,7 +86,7 @@ TEST_F(GmmTests, GivenUncacheableWhenGmmIsCreatedThenAllResourceAreCreated) {
8686
std::unique_ptr<MemoryManager> mm(new MemoryManagerCreate<OsAgnosticMemoryManager>(false, false, *executionEnvironment));
8787
void *pSysMem = mm->allocateSystemMemory(4096, 4096);
8888

89-
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), pSysMem, 4096, true));
89+
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), pSysMem, 4096, 0, true));
9090

9191
ASSERT_TRUE(gmm->gmmResourceInfo.get() != nullptr);
9292

@@ -103,7 +103,7 @@ TEST_F(GmmTests, givenHostPointerWithHighestBitSetWhenGmmIsCreatedThenItHasTheSa
103103
auto address = reinterpret_cast<void *>(addressWithHighestBitSet);
104104
auto expectedAddress = castToUint64(address);
105105

106-
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), address, 4096, false));
106+
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), address, 4096, 0, false));
107107
EXPECT_EQ(gmm->resourceParams.pExistingSysMem, expectedAddress);
108108
}
109109

@@ -113,7 +113,7 @@ TEST_F(GmmTests, GivenBufferSizeLargerThenMaxPitchWhenAskedForGmmCreationThenGmm
113113
MemoryManager *mm = new MemoryManagerCreate<OsAgnosticMemoryManager>(false, false, *executionEnvironment);
114114
void *pSysMem = mm->allocateSystemMemory(4096, 4096);
115115

116-
auto gmmRes = new Gmm(getGmmClientContext(), pSysMem, maxSize, false);
116+
auto gmmRes = new Gmm(getGmmClientContext(), pSysMem, maxSize, 0, false);
117117

118118
ASSERT_TRUE(gmmRes->gmmResourceInfo.get() != nullptr);
119119

@@ -127,7 +127,7 @@ TEST_F(GmmTests, GivenBufferSizeLargerThenMaxPitchWhenAskedForGmmCreationThenGmm
127127
TEST_F(GmmTests, givenGmmCreatedFromExistingGmmThenHelperDoesNotReleaseParentGmm) {
128128
auto size = 4096u;
129129
void *incomingPtr = (void *)0x1000;
130-
auto gmmRes = new Gmm(getGmmClientContext(), incomingPtr, size, false);
130+
auto gmmRes = new Gmm(getGmmClientContext(), incomingPtr, size, 0, false);
131131
auto gmmRes2 = new Gmm(getGmmClientContext(), gmmRes->gmmResourceInfo->peekHandle());
132132

133133
//copy is being made
@@ -204,20 +204,20 @@ TEST_F(GmmTests, WhenQueryingImgParamsThenCorrectValuesAreReturned) {
204204
TEST_F(GmmTests, givenWidthWhenCreatingResourceThenSetWidth64Field) {
205205
const void *dummyPtr = reinterpret_cast<void *>(0x123);
206206
size_t allocationSize = std::numeric_limits<size_t>::max();
207-
Gmm gmm(getGmmClientContext(), dummyPtr, allocationSize, false);
207+
Gmm gmm(getGmmClientContext(), dummyPtr, allocationSize, 0, false);
208208
EXPECT_EQ(static_cast<uint64_t>(allocationSize), gmm.resourceParams.BaseWidth64);
209209
}
210210

211211
TEST_F(GmmTests, givenNullptrWhenGmmConstructorIsCalledThenNoGfxMemoryIsProperlySet) {
212212
void *pSysMem = nullptr;
213-
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), pSysMem, 4096, false));
213+
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), pSysMem, 4096, 0, false));
214214

215215
EXPECT_EQ(gmm->resourceParams.NoGfxMemory, 1u);
216216
}
217217

218218
TEST_F(GmmTests, givenPtrWhenGmmConstructorIsCalledThenNoGfxMemoryIsProperlySet) {
219219
void *pSysMem = reinterpret_cast<void *>(0x1111);
220-
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), pSysMem, 4096, false));
220+
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), pSysMem, 4096, 0, false));
221221

222222
EXPECT_EQ(gmm->resourceParams.NoGfxMemory, 0u);
223223
}
@@ -432,7 +432,7 @@ struct GmmMediaCompressedTests : public GmmTests {
432432
void SetUp() override {
433433
GmmTests::SetUp();
434434
StorageInfo info;
435-
gmm = std::make_unique<Gmm>(getGmmClientContext(), nullptr, 4, false, true, true, info);
435+
gmm = std::make_unique<Gmm>(getGmmClientContext(), nullptr, 4, 0, false, true, true, info);
436436
flags = gmm->gmmResourceInfo->getResourceFlags();
437437
flags->Gpu.CCS = true;
438438
flags->Gpu.UnifiedAuxSurface = true;
@@ -696,7 +696,7 @@ TEST_F(GmmTests, GivenPlaneWhenCopyingResourceBltThenResourceIsCopiedCorrectly)
696696
}
697697

698698
TEST_F(GmmTests, givenAllValidFlagsWhenAskedForUnifiedAuxTranslationCapabilityThenReturnTrue) {
699-
auto gmm = std::unique_ptr<Gmm>(new Gmm(getGmmClientContext(), nullptr, 1, false));
699+
auto gmm = std::unique_ptr<Gmm>(new Gmm(getGmmClientContext(), nullptr, 1, 0, false));
700700
auto mockResource = reinterpret_cast<MockGmmResourceInfo *>(gmm->gmmResourceInfo.get());
701701

702702
mockResource->setUnifiedAuxTranslationCapable();
@@ -707,8 +707,14 @@ TEST_F(GmmTests, givenAllValidFlagsWhenAskedForUnifiedAuxTranslationCapabilityTh
707707
EXPECT_TRUE(gmm->unifiedAuxTranslationCapable());
708708
}
709709

710+
TEST_F(GmmTests, givenAlignmentValueWhenConstructingGmmThenSetAlignmentInResourceCreateObject) {
711+
const uint32_t alignment = 8096;
712+
Gmm gmm{getGmmClientContext(), nullptr, 1, alignment, false};
713+
EXPECT_EQ(alignment, gmm.resourceParams.BaseAlignment);
714+
}
715+
710716
TEST_F(GmmTests, givenInvalidFlagsSetWhenAskedForUnifiedAuxTranslationCapabilityThenReturnFalse) {
711-
auto gmm = std::unique_ptr<Gmm>(new Gmm(getGmmClientContext(), nullptr, 1, false));
717+
auto gmm = std::unique_ptr<Gmm>(new Gmm(getGmmClientContext(), nullptr, 1, 0, false));
712718
auto mockResource = reinterpret_cast<MockGmmResourceInfo *>(gmm->gmmResourceInfo.get());
713719

714720
mockResource->mockResourceCreateParams.Flags.Gpu.CCS = 0;
@@ -761,12 +767,12 @@ TEST_F(GmmTests, whenResourceIsCreatedThenHandleItsOwnership) {
761767
using GmmEnvironmentTest = MockExecutionEnvironmentGmmFixtureTest;
762768

763769
TEST_F(GmmEnvironmentTest, givenGmmWithNotSetMCSInResourceInfoGpuFlagsWhenCallHasMultisampleControlSurfaceThenReturnFalse) {
764-
auto gmm = std::unique_ptr<Gmm>(new Gmm(getGmmClientContext(), nullptr, 1, false));
770+
auto gmm = std::unique_ptr<Gmm>(new Gmm(getGmmClientContext(), nullptr, 1, 0, false));
765771
EXPECT_FALSE(gmm->hasMultisampleControlSurface());
766772
}
767773

768774
TEST_F(GmmEnvironmentTest, givenGmmWithSetMCSInResourceInfoGpuFlagsWhenCallhasMultisampleControlSurfaceThenReturnTrue) {
769-
auto gmm = std::unique_ptr<Gmm>(new Gmm(getGmmClientContext(), nullptr, 1, false));
775+
auto gmm = std::unique_ptr<Gmm>(new Gmm(getGmmClientContext(), nullptr, 1, 0, false));
770776
auto mockResource = reinterpret_cast<MockGmmResourceInfo *>(gmm->gmmResourceInfo.get());
771777
mockResource->setMultisampleControlSurface();
772778
EXPECT_TRUE(gmm->hasMultisampleControlSurface());
@@ -826,7 +832,7 @@ TEST(GmmHelperTest, givenValidGmmFunctionsWhenCreateGmmHelperWithoutOsInterfaceT
826832

827833
using GmmCompressionTest = GmmTests;
828834
TEST_F(GmmCompressionTest, givenEnabledAndPreferredE2ECWhenApplyingForBuffersThenSetValidFlags) {
829-
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), nullptr, 1, false));
835+
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), nullptr, 1, 0, false));
830836
gmm->resourceParams = {};
831837

832838
localPlatformDevice->capabilityTable.ftrRenderCompressedBuffers = true;
@@ -840,7 +846,7 @@ TEST_F(GmmCompressionTest, givenEnabledAndPreferredE2ECWhenApplyingForBuffersThe
840846

841847
TEST_F(GmmCompressionTest, givenDisabledE2ECAndEnabledDebugFlagWhenApplyingForBuffersThenSetValidFlags) {
842848
DebugManagerStateRestore restore;
843-
Gmm gmm(getGmmClientContext(), nullptr, 1, false);
849+
Gmm gmm(getGmmClientContext(), nullptr, 1, 0, false);
844850
gmm.resourceParams = {};
845851

846852
DebugManager.flags.RenderCompressedBuffersEnabled.set(1);
@@ -865,7 +871,7 @@ TEST_F(GmmCompressionTest, givenDisabledE2ECAndEnabledDebugFlagWhenApplyingForBu
865871
}
866872

867873
TEST_F(GmmCompressionTest, givenEnabledAndNotPreferredE2ECWhenApplyingForBuffersThenDontSetValidFlags) {
868-
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), nullptr, 1, false));
874+
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), nullptr, 1, 0, false));
869875
gmm->resourceParams = {};
870876

871877
localPlatformDevice->capabilityTable.ftrRenderCompressedBuffers = true;
@@ -878,7 +884,7 @@ TEST_F(GmmCompressionTest, givenEnabledAndNotPreferredE2ECWhenApplyingForBuffers
878884
}
879885

880886
TEST_F(GmmCompressionTest, givenDisabledAndPreferredE2ECWhenApplyingForBuffersThenDontSetValidFlags) {
881-
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), nullptr, 1, false));
887+
std::unique_ptr<Gmm> gmm(new Gmm(getGmmClientContext(), nullptr, 1, 0, false));
882888
gmm->resourceParams = {};
883889

884890
localPlatformDevice->capabilityTable.ftrRenderCompressedBuffers = false;

opencl/test/unit_test/helpers/hw_helper_tests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ HWTEST_F(HwHelperTest, givenCreatedSurfaceStateBufferWhenAllocationProvidedThenU
434434
size_t allocSize = size;
435435
length.Length = static_cast<uint32_t>(allocSize - 1);
436436
GraphicsAllocation allocation(0, GraphicsAllocation::AllocationType::UNKNOWN, cpuAddr, gpuAddr, 0u, allocSize, MemoryPool::MemoryNull, 0u);
437-
allocation.setDefaultGmm(new Gmm(pDevice->getGmmClientContext(), allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), false));
437+
allocation.setDefaultGmm(new Gmm(pDevice->getGmmClientContext(), allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), 0, false));
438438
SURFACE_TYPE type = RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_BUFFER;
439439
helper.setRenderSurfaceStateForBuffer(rootDeviceEnvironment, stateBuffer, size, addr, 0, pitch, &allocation, false, type, true, false);
440440
EXPECT_EQ(length.SurfaceState.Depth + 1u, state->getDepth());
@@ -471,7 +471,7 @@ HWTEST_F(HwHelperTest, givenCreatedSurfaceStateBufferWhenGmmAndAllocationCompres
471471
uint64_t gpuAddr = 0x4000u;
472472
size_t allocSize = size;
473473
GraphicsAllocation allocation(0, GraphicsAllocation::AllocationType::BUFFER_COMPRESSED, cpuAddr, gpuAddr, 0u, allocSize, MemoryPool::MemoryNull, 0u);
474-
allocation.setDefaultGmm(new Gmm(rootDeviceEnvironment.getGmmClientContext(), allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), false));
474+
allocation.setDefaultGmm(new Gmm(rootDeviceEnvironment.getGmmClientContext(), allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), 0, false));
475475
allocation.getDefaultGmm()->isRenderCompressed = true;
476476
SURFACE_TYPE type = RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_BUFFER;
477477
helper.setRenderSurfaceStateForBuffer(rootDeviceEnvironment, stateBuffer, size, addr, 0, pitch, &allocation, false, type, false, false);
@@ -503,7 +503,7 @@ HWTEST_F(HwHelperTest, givenCreatedSurfaceStateBufferWhenGmmCompressionDisabledA
503503
uint64_t gpuAddr = 0x4000u;
504504
size_t allocSize = size;
505505
GraphicsAllocation allocation(0, GraphicsAllocation::AllocationType::BUFFER_COMPRESSED, cpuAddr, gpuAddr, 0u, allocSize, MemoryPool::MemoryNull, 1);
506-
allocation.setDefaultGmm(new Gmm(rootDeviceEnvironment.getGmmClientContext(), allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), false));
506+
allocation.setDefaultGmm(new Gmm(rootDeviceEnvironment.getGmmClientContext(), allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), 0, false));
507507
SURFACE_TYPE type = RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_BUFFER;
508508
helper.setRenderSurfaceStateForBuffer(rootDeviceEnvironment, stateBuffer, size, addr, 0, pitch, &allocation, false, type, false, false);
509509
EXPECT_EQ(RENDER_SURFACE_STATE::COHERENCY_TYPE_IA_COHERENT, state->getCoherencyType());
@@ -534,7 +534,7 @@ HWTEST_F(HwHelperTest, givenCreatedSurfaceStateBufferWhenGmmAndAllocationCompres
534534
uint64_t gpuAddr = 0x4000u;
535535
size_t allocSize = size;
536536
GraphicsAllocation allocation(0, GraphicsAllocation::AllocationType::BUFFER_COMPRESSED, cpuAddr, gpuAddr, 0u, allocSize, MemoryPool::MemoryNull, 1u);
537-
allocation.setDefaultGmm(new Gmm(rootDeviceEnvironment.getGmmClientContext(), allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), false));
537+
allocation.setDefaultGmm(new Gmm(rootDeviceEnvironment.getGmmClientContext(), allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), 0, false));
538538
allocation.getDefaultGmm()->isRenderCompressed = true;
539539
SURFACE_TYPE type = RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_BUFFER;
540540
helper.setRenderSurfaceStateForBuffer(rootDeviceEnvironment, stateBuffer, size, addr, 0, pitch, &allocation, false, type, true, false);

opencl/test/unit_test/mem_obj/buffer_set_arg_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ HWTEST_F(BufferSetArgTest, givenNonPureStatefulArgWhenRenderCompressedBufferIsSe
189189
auto surfaceState = reinterpret_cast<RENDER_SURFACE_STATE *>(ptrOffset(pKernel->getSurfaceStateHeap(), pKernelInfo->kernelArgInfo[0].offsetHeap));
190190
auto graphicsAllocation = buffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex());
191191
graphicsAllocation->setAllocationType(GraphicsAllocation::AllocationType::BUFFER_COMPRESSED);
192-
graphicsAllocation->setDefaultGmm(new Gmm(pDevice->getGmmClientContext(), graphicsAllocation->getUnderlyingBuffer(), buffer->getSize(), false));
192+
graphicsAllocation->setDefaultGmm(new Gmm(pDevice->getGmmClientContext(), graphicsAllocation->getUnderlyingBuffer(), buffer->getSize(), 0, false));
193193
graphicsAllocation->getDefaultGmm()->isRenderCompressed = true;
194194
pKernelInfo->requiresSshForBuffers = true;
195195
cl_mem clMem = buffer;

opencl/test/unit_test/mem_obj/buffer_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@ HWTEST_F(BufferSetSurfaceTests, givenRenderCompressedGmmResourceWhenSurfaceState
16431643
std::unique_ptr<Buffer> buffer(Buffer::create(&context, CL_MEM_READ_WRITE, 1, nullptr, retVal));
16441644
auto graphicsAllocation = buffer->getGraphicsAllocation(rootDeviceIndex);
16451645
graphicsAllocation->setAllocationType(GraphicsAllocation::AllocationType::BUFFER_COMPRESSED);
1646-
auto gmm = new Gmm(context.getDevice(0)->getGmmClientContext(), nullptr, 1, false);
1646+
auto gmm = new Gmm(context.getDevice(0)->getGmmClientContext(), nullptr, 1, 0, false);
16471647
graphicsAllocation->setDefaultGmm(gmm);
16481648
gmm->isRenderCompressed = true;
16491649

@@ -1664,7 +1664,7 @@ HWTEST_F(BufferSetSurfaceTests, givenNonRenderCompressedGmmResourceWhenSurfaceSt
16641664
auto retVal = CL_SUCCESS;
16651665

16661666
std::unique_ptr<Buffer> buffer(Buffer::create(&context, CL_MEM_READ_WRITE, 1, nullptr, retVal));
1667-
auto gmm = new Gmm(context.getDevice(0)->getGmmClientContext(), nullptr, 1, false);
1667+
auto gmm = new Gmm(context.getDevice(0)->getGmmClientContext(), nullptr, 1, 0, false);
16681668
buffer->getGraphicsAllocation(rootDeviceIndex)->setDefaultGmm(gmm);
16691669
gmm->isRenderCompressed = false;
16701670

0 commit comments

Comments
 (0)