Skip to content

Commit 39c1c4d

Browse files
Remove virtual padding support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
1 parent 70cf43f commit 39c1c4d

File tree

13 files changed

+3
-378
lines changed

13 files changed

+3
-378
lines changed

opencl/source/mem_obj/image.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -268,16 +268,6 @@ Image *Image::create(Context *context,
268268

269269
UNRECOVERABLE_IF(imgInfo.offset != 0);
270270
imgInfo.offset = parentBuffer->getOffset();
271-
272-
if (memoryManager->peekVirtualPaddingSupport() && (imageDesc->image_type == CL_MEM_OBJECT_IMAGE2D) && (allocationInfo[rootDeviceIndex].memory->getUnderlyingBuffer() != 0)) {
273-
// Retrieve sizes from GMM and apply virtual padding if buffer storage is not big enough
274-
auto queryGmmImgInfo(imgInfo);
275-
auto gmm = std::make_unique<Gmm>(gmmHelper, queryGmmImgInfo, StorageInfo{}, preferCompression);
276-
auto gmmAllocationSize = gmm->gmmResourceInfo->getSizeAllocation();
277-
if (gmmAllocationSize > allocationInfo[rootDeviceIndex].memory->getUnderlyingBufferSize()) {
278-
allocationInfo[rootDeviceIndex].memory = memoryManager->createGraphicsAllocationWithPadding(allocationInfo[rootDeviceIndex].memory, gmmAllocationSize);
279-
}
280-
}
281271
} else if (parentImage != nullptr) {
282272
allocationInfo[rootDeviceIndex].memory = parentImage->getGraphicsAllocation(rootDeviceIndex);
283273
allocationInfo[rootDeviceIndex].memory->getDefaultGmm()->queryImageParams(imgInfo);

opencl/source/mem_obj/mem_obj.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ MemObj::~MemObj() {
9999
if (mcsAllocation) {
100100
destroyGraphicsAllocation(mcsAllocation, false);
101101
}
102-
if (graphicsAllocation && associatedMemObject) {
103-
if (associatedMemObject->getGraphicsAllocation(graphicsAllocation->getRootDeviceIndex()) != graphicsAllocation) {
104-
destroyGraphicsAllocation(graphicsAllocation, false);
105-
}
106-
}
107102
}
108103
if (associatedMemObject) {
109104
associatedMemObject->decRefInternal();

opencl/test/unit_test/gmm_helper/gmm_helper_tests.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -262,27 +262,6 @@ TEST_F(GmmTests, given2DimageFromBufferParametersWhenGmmResourceIsCreatedThenItH
262262
EXPECT_EQ(imgDesc.imageRowPitch, queryGmm->gmmResourceInfo->getRenderPitch());
263263
}
264264

265-
TEST_F(GmmTests, given2DimageFromBufferParametersWhenGmmResourceIsCreatedAndPitchIsOverridenThenItHasDesiredPitchAndSize) {
266-
ImageDescriptor imgDesc = {};
267-
imgDesc.imageType = ImageType::Image2D;
268-
imgDesc.imageWidth = 329;
269-
imgDesc.imageHeight = 349;
270-
imgDesc.imageDepth = 1;
271-
imgDesc.imageRowPitch = 5376;
272-
imgDesc.fromParent = true;
273-
274-
SurfaceFormatInfo surfaceFormat = {GMM_FORMAT_R32G32B32A32_FLOAT_TYPE, (GFX3DSTATE_SURFACEFORMAT)0, 0, 4, 4, 16};
275-
276-
auto imgInfo = MockGmm::initImgInfo(imgDesc, 0, &surfaceFormat);
277-
EXPECT_EQ(imgInfo.imgDesc.imageRowPitch, imgDesc.imageRowPitch);
278-
auto queryGmm = MockGmm::queryImgParams(getGmmHelper(), imgInfo, false);
279-
auto renderSize = queryGmm->gmmResourceInfo->getSizeAllocation();
280-
281-
size_t expectedSize = imgDesc.imageRowPitch * imgDesc.imageHeight;
282-
EXPECT_GE(renderSize, expectedSize);
283-
EXPECT_EQ(imgDesc.imageRowPitch, queryGmm->gmmResourceInfo->getRenderPitch());
284-
}
285-
286265
TEST_F(GmmTests, givenPlanarFormatsWhenQueryingImageParamsThenUvOffsetIsQueried) {
287266
ImageDescriptor imgDesc = {};
288267
imgDesc.imageType = ImageType::Image2D;

opencl/test/unit_test/mem_obj/image2d_from_buffer_tests.cpp

Lines changed: 0 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -302,157 +302,6 @@ TEST_F(Image2dFromBufferTest, givenImageFromBufferWhenItIsRedescribedThenItRetur
302302
EXPECT_TRUE(redescribedfillImage->isImageFromBuffer());
303303
}
304304

305-
TEST_F(Image2dFromBufferTest, givenMemoryManagerNotSupportingVirtualPaddingWhenImageIsCreatedThenPaddingIsNotApplied) {
306-
auto memoryManager = context.getMemoryManager();
307-
memoryManager->setVirtualPaddingSupport(false);
308-
309-
auto buffer = castToObject<Buffer>(imageDesc.mem_object);
310-
ASSERT_NE(nullptr, buffer);
311-
EXPECT_EQ(1, buffer->getRefInternalCount());
312-
313-
std::unique_ptr<Image> imageFromBuffer(createImage());
314-
ASSERT_EQ(CL_SUCCESS, retVal);
315-
316-
//graphics allocation for image and buffer is the same
317-
auto bufferGraphicsAllocation = buffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
318-
auto imageGraphicsAllocation = imageFromBuffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
319-
320-
EXPECT_EQ(bufferGraphicsAllocation, imageGraphicsAllocation);
321-
}
322-
323-
TEST_F(Image2dFromBufferTest, givenMemoryManagerSupportingVirtualPaddingWhenImageIsCreatedThatFitsInTheBufferThenPaddingIsNotApplied) {
324-
auto memoryManager = context.getMemoryManager();
325-
memoryManager->setVirtualPaddingSupport(true);
326-
327-
auto buffer = castToObject<Buffer>(imageDesc.mem_object);
328-
329-
ASSERT_NE(nullptr, buffer);
330-
EXPECT_EQ(1, buffer->getRefInternalCount());
331-
332-
std::unique_ptr<Image> imageFromBuffer(createImage());
333-
ASSERT_EQ(CL_SUCCESS, retVal);
334-
335-
//graphics allocation for image and buffer is the same
336-
auto bufferGraphicsAllocation = buffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
337-
auto imageGraphicsAllocation = imageFromBuffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
338-
339-
EXPECT_EQ(this->size, bufferGraphicsAllocation->getUnderlyingBufferSize());
340-
341-
auto imageDescriptor = Image::convertDescriptor(imageDesc);
342-
auto imgInfo = MockGmm::initImgInfo(imageDescriptor, 0, &imageFromBuffer->getSurfaceFormatInfo().surfaceFormat);
343-
auto queryGmm = MockGmm::queryImgParams(context.getDevice(0)->getGmmHelper(), imgInfo, false);
344-
345-
EXPECT_TRUE(queryGmm->gmmResourceInfo->getSizeAllocation() >= this->size);
346-
347-
EXPECT_EQ(bufferGraphicsAllocation, imageGraphicsAllocation);
348-
}
349-
350-
TEST_F(Image2dFromBufferTest, givenMemoryManagerSupportingVirtualPaddingWhenImageIsCreatedFromLocalMemoryBufferThenPaddingIsNotApplied) {
351-
auto memoryManager = context.getMemoryManager();
352-
memoryManager->setVirtualPaddingSupport(true);
353-
354-
auto buffer = castToObject<Buffer>(imageDesc.mem_object);
355-
356-
uint64_t gpuAddress = 0x1234;
357-
auto cpuAddress = buffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex())->getUnderlyingBuffer();
358-
auto gmmHelper = context.getDevice(0)->getGmmHelper();
359-
auto canonizedGpuAddress = gmmHelper->canonize(gpuAddress);
360-
361-
buffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex())->setCpuPtrAndGpuAddress(0, canonizedGpuAddress);
362-
363-
ASSERT_NE(nullptr, buffer);
364-
EXPECT_EQ(1, buffer->getRefInternalCount());
365-
366-
std::unique_ptr<Image> imageFromBuffer(createImage());
367-
ASSERT_EQ(CL_SUCCESS, retVal);
368-
369-
//graphics allocation for image and buffer is the same
370-
auto bufferGraphicsAllocation = buffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
371-
auto imageGraphicsAllocation = imageFromBuffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
372-
373-
EXPECT_EQ(this->size, bufferGraphicsAllocation->getUnderlyingBufferSize());
374-
375-
auto imageDescriptor = Image::convertDescriptor(imageDesc);
376-
auto imgInfo = MockGmm::initImgInfo(imageDescriptor, 0, &imageFromBuffer->getSurfaceFormatInfo().surfaceFormat);
377-
auto queryGmm = MockGmm::queryImgParams(context.getDevice(0)->getGmmHelper(), imgInfo, false);
378-
379-
EXPECT_TRUE(queryGmm->gmmResourceInfo->getSizeAllocation() >= this->size);
380-
381-
EXPECT_EQ(bufferGraphicsAllocation, imageGraphicsAllocation);
382-
383-
buffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex())->setCpuPtrAndGpuAddress(cpuAddress, canonizedGpuAddress);
384-
}
385-
386-
TEST_F(Image2dFromBufferTest, givenMemoryManagerSupportingVirtualPaddingWhenImageIsCreatedThatDoesntFitInTheBufferThenPaddingIsApplied) {
387-
imageFormat.image_channel_data_type = CL_FLOAT;
388-
imageFormat.image_channel_order = CL_RGBA;
389-
imageDesc.image_width = 29;
390-
imageDesc.image_height = 29;
391-
imageDesc.image_row_pitch = 512;
392-
393-
//application calcualted buffer size
394-
auto bufferSize = imageDesc.image_row_pitch * imageDesc.image_height;
395-
auto buffer2 = clCreateBuffer(&context, CL_MEM_READ_WRITE, bufferSize, nullptr, nullptr);
396-
397-
auto storeMem = imageDesc.mem_object;
398-
399-
imageDesc.mem_object = buffer2;
400-
401-
auto memoryManager = context.getMemoryManager();
402-
memoryManager->setVirtualPaddingSupport(true);
403-
404-
auto buffer = castToObject<Buffer>(imageDesc.mem_object);
405-
406-
std::unique_ptr<Image> imageFromBuffer(createImage());
407-
ASSERT_EQ(CL_SUCCESS, retVal);
408-
409-
//graphics allocation for image and buffer is the same
410-
auto bufferGraphicsAllocation = buffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
411-
auto imageGraphicsAllocation = imageFromBuffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
412-
413-
EXPECT_EQ(bufferSize, bufferGraphicsAllocation->getUnderlyingBufferSize());
414-
415-
auto imageDescriptor = Image::convertDescriptor(imageDesc);
416-
auto imgInfo = MockGmm::initImgInfo(imageDescriptor, 0, &imageFromBuffer->getSurfaceFormatInfo().surfaceFormat);
417-
auto queryGmm = MockGmm::queryImgParams(context.getDevice(0)->getGmmHelper(), imgInfo, false);
418-
419-
EXPECT_GT(queryGmm->gmmResourceInfo->getSizeAllocation(), bufferSize);
420-
421-
EXPECT_NE(bufferGraphicsAllocation, imageGraphicsAllocation);
422-
EXPECT_EQ(queryGmm->gmmResourceInfo->getSizeAllocation(), imageFromBuffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex())->getUnderlyingBufferSize());
423-
EXPECT_EQ(bufferSize, imageFromBuffer->getSize());
424-
imageDesc.mem_object = storeMem;
425-
clReleaseMemObject(buffer2);
426-
}
427-
TEST_F(Image2dFromBufferTest, givenMemoryManagerSupportingVirtualPaddingWhen1DImageFromBufferImageIsCreatedThenVirtualPaddingIsNotApplied) {
428-
imageFormat.image_channel_data_type = CL_FLOAT;
429-
imageFormat.image_channel_order = CL_RGBA;
430-
imageDesc.image_width = 1024;
431-
imageDesc.image_type = CL_MEM_OBJECT_IMAGE1D_BUFFER;
432-
433-
//application calcualted buffer size
434-
auto bufferSize = imageDesc.image_width * 16;
435-
auto buffer2 = clCreateBuffer(&context, CL_MEM_READ_WRITE, bufferSize, nullptr, nullptr);
436-
auto storeMem = imageDesc.mem_object;
437-
imageDesc.mem_object = buffer2;
438-
439-
auto memoryManager = context.getMemoryManager();
440-
memoryManager->setVirtualPaddingSupport(true);
441-
442-
auto buffer = castToObject<Buffer>(imageDesc.mem_object);
443-
444-
std::unique_ptr<Image> imageFromBuffer(createImage());
445-
ASSERT_EQ(CL_SUCCESS, retVal);
446-
447-
//graphics allocation match
448-
auto bufferGraphicsAllocation = buffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
449-
auto imageGraphicsAllocation = imageFromBuffer->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
450-
451-
EXPECT_EQ(bufferGraphicsAllocation, imageGraphicsAllocation);
452-
imageDesc.mem_object = storeMem;
453-
clReleaseMemObject(buffer2);
454-
}
455-
456305
TEST_F(Image2dFromBufferTest, givenMemoryManagerSupporting1DImageFromBufferWhenNoBufferThenCreatesImage) {
457306

458307
imageDesc.image_type = CL_MEM_OBJECT_IMAGE1D_BUFFER;

opencl/test/unit_test/memory_manager/memory_manager_tests.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,20 +1241,6 @@ TEST(OsAgnosticMemoryManager, givenDefaultMemoryManagerWhenGraphicsAllocationCon
12411241
memoryManager.freeGraphicsMemory(graphicsAllocation);
12421242
}
12431243

1244-
TEST(OsAgnosticMemoryManager, givenDefaultMemoryManagerWhenGraphicsAllocationIsPaddedThenNewGraphicsAllocationIsCreated) {
1245-
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
1246-
MemoryManagerCreate<OsAgnosticMemoryManager> memoryManager(false, false, executionEnvironment);
1247-
auto graphicsAllocation = memoryManager.allocateGraphicsMemoryWithProperties(MockAllocationProperties{0, MemoryConstants::pageSize});
1248-
1249-
auto sizeWithPadding = 8192;
1250-
auto paddedGraphicsAllocation = memoryManager.createGraphicsAllocationWithPadding(graphicsAllocation, sizeWithPadding);
1251-
ASSERT_NE(nullptr, paddedGraphicsAllocation);
1252-
EXPECT_NE(paddedGraphicsAllocation, graphicsAllocation);
1253-
1254-
memoryManager.freeGraphicsMemory(paddedGraphicsAllocation);
1255-
memoryManager.freeGraphicsMemory(graphicsAllocation);
1256-
}
1257-
12581244
TEST(OsAgnosticMemoryManager, WhenPointerIsCreatedThenLeakIsDetected) {
12591245
void *ptr = new int[10];
12601246
EXPECT_NE(nullptr, ptr); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)

opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,41 +2855,6 @@ TEST_F(DrmMemoryManagerTest, givenSharedAllocationWithSmallerThenRealSizeWhenCre
28552855
memoryManager->freeGraphicsMemory(graphicsAllocation);
28562856
}
28572857

2858-
TEST_F(DrmMemoryManagerTest, givenMemoryManagerSupportingVirutalPaddingWhenItIsRequiredThenNewGraphicsAllocationIsCreated) {
2859-
mock->ioctl_expected.gemUserptr = 2;
2860-
mock->ioctl_expected.gemWait = 2;
2861-
mock->ioctl_expected.gemClose = 2;
2862-
// first let's create normal buffer
2863-
auto bufferSize = MemoryConstants::pageSize;
2864-
auto buffer = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{rootDeviceIndex, bufferSize});
2865-
2866-
// buffer should have size 16
2867-
EXPECT_EQ(bufferSize, buffer->getUnderlyingBufferSize());
2868-
2869-
auto bufferWithPaddingSize = 8192u;
2870-
auto paddedAllocation = memoryManager->createGraphicsAllocationWithPadding(buffer, 8192u);
2871-
EXPECT_NE(nullptr, paddedAllocation);
2872-
2873-
EXPECT_NE(0u, paddedAllocation->getGpuAddress());
2874-
EXPECT_NE(0u, paddedAllocation->getGpuAddressToPatch());
2875-
EXPECT_NE(buffer->getGpuAddress(), paddedAllocation->getGpuAddress());
2876-
EXPECT_NE(buffer->getGpuAddressToPatch(), paddedAllocation->getGpuAddressToPatch());
2877-
EXPECT_EQ(buffer->getUnderlyingBuffer(), paddedAllocation->getUnderlyingBuffer());
2878-
2879-
EXPECT_EQ(bufferWithPaddingSize, paddedAllocation->getUnderlyingBufferSize());
2880-
EXPECT_FALSE(paddedAllocation->isCoherent());
2881-
EXPECT_EQ(0u, paddedAllocation->fragmentsStorage.fragmentCount);
2882-
2883-
auto bufferbo = static_cast<DrmAllocation *>(buffer)->getBO();
2884-
auto bo = static_cast<DrmAllocation *>(paddedAllocation)->getBO();
2885-
EXPECT_NE(nullptr, bo);
2886-
2887-
EXPECT_NE(bufferbo->peekHandle(), bo->peekHandle());
2888-
2889-
memoryManager->freeGraphicsMemory(paddedAllocation);
2890-
memoryManager->freeGraphicsMemory(buffer);
2891-
}
2892-
28932858
TEST_F(DrmMemoryManagerTest, givenMemoryManagerWhenAskedForInternalAllocationWithNoPointerThenAllocationFromInternalHeapIsReturned) {
28942859
mock->ioctl_expected.gemUserptr = 1;
28952860
mock->ioctl_expected.gemWait = 1;
@@ -3008,28 +2973,6 @@ TEST_F(DrmMemoryManagerTest, givenMemoryManagerWhenAskedForInternalAllocationWit
30082973
memoryManager->freeGraphicsMemory(drmAllocation);
30092974
}
30102975

3011-
TEST_F(DrmMemoryManagerTest, givenMemoryManagerSupportingVirutalPaddingWhenAllocUserptrFailsThenReturnsNullptr) {
3012-
mock->ioctl_expected.gemUserptr = 2;
3013-
mock->ioctl_expected.gemWait = 1;
3014-
mock->ioctl_expected.gemClose = 1;
3015-
this->ioctlResExt = {mock->ioctl_cnt.total + 1, -1};
3016-
mock->ioctl_res_ext = &ioctlResExt;
3017-
3018-
// first let's create normal buffer
3019-
auto bufferSize = MemoryConstants::pageSize;
3020-
auto buffer = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{rootDeviceIndex, bufferSize});
3021-
3022-
// buffer should have size 16
3023-
EXPECT_EQ(bufferSize, buffer->getUnderlyingBufferSize());
3024-
3025-
auto bufferWithPaddingSize = 8192u;
3026-
auto paddedAllocation = memoryManager->createGraphicsAllocationWithPadding(buffer, bufferWithPaddingSize);
3027-
EXPECT_EQ(nullptr, paddedAllocation);
3028-
3029-
memoryManager->freeGraphicsMemory(buffer);
3030-
mock->ioctl_res_ext = &mock->NONE;
3031-
}
3032-
30332976
using DrmMemoryManagerUSMHostAllocationTests = Test<DrmMemoryManagerFixture>;
30342977

30352978
TEST_F(DrmMemoryManagerUSMHostAllocationTests, givenCallToAllocateGraphicsMemoryWithAlignmentWithIsHostUsmAllocationSetToFalseThenNewHostPointerIsUsedAndAllocationIsCreatedSuccesfully) {
@@ -3101,10 +3044,6 @@ TEST_F(DrmMemoryManagerUSMHostAllocationTests,
31013044
alignedFree(hostPtr);
31023045
}
31033046

3104-
TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenDefaultDrmMemoryManagerWhenAskedForVirtualPaddingSupportThenTrueIsReturned) {
3105-
EXPECT_FALSE(memoryManager->peekVirtualPaddingSupport());
3106-
}
3107-
31083047
TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenDefaultDrmMemoryManagerWhenAskedForAlignedMallocRestrictionsThenNullPtrIsReturned) {
31093048
EXPECT_EQ(nullptr, memoryManager->getAlignedMallocRestrictions());
31103049
}
@@ -5775,51 +5714,6 @@ TEST_F(DrmMemoryManagerTest, givenDrmWhenRetrieveMmapOffsetForBufferObjectIsCall
57755714
}
57765715
}
57775716

5778-
TEST_F(DrmMemoryManagerTest, whenCallPaddedAllocationWithoutMmapPtrThenOnlyUserptrCalled) {
5779-
mock->ioctl_expected.gemUserptr = 1;
5780-
mock->ioctl_expected.gemClose = 1;
5781-
5782-
void *cpuPtr = (void *)0x30000;
5783-
size_t size = 0x1000;
5784-
DrmAllocation gfxAllocation(rootDeviceIndex, AllocationType::UNKNOWN, nullptr, cpuPtr, size, (osHandle)1u, MemoryPool::MemoryNull);
5785-
auto gfxPaddedAllocation = memoryManager->createPaddedAllocation(&gfxAllocation, size);
5786-
ASSERT_NE(nullptr, gfxPaddedAllocation);
5787-
memoryManager->freeGraphicsMemoryImpl(gfxPaddedAllocation);
5788-
}
5789-
5790-
TEST_F(DrmMemoryManagerTest, whenCallPaddedAllocationWithMmapPtrThenMmapCalled) {
5791-
mock->ioctl_expected.gemMmap = 1;
5792-
mock->ioctl_expected.gemUserptr = 1;
5793-
mock->ioctl_expected.gemClose = 1;
5794-
BufferObject bo(mock, 3, 1, 1024, 0);
5795-
5796-
void *cpuPtr = (void *)0x30000;
5797-
size_t size = 0x1000;
5798-
DrmAllocation gfxAllocation(rootDeviceIndex, AllocationType::UNKNOWN, &bo, cpuPtr, size, (osHandle)1u, MemoryPool::MemoryNull);
5799-
gfxAllocation.setMmapPtr(cpuPtr);
5800-
gfxAllocation.setMmapSize(size);
5801-
auto gfxPaddedAllocation = memoryManager->createPaddedAllocation(&gfxAllocation, size);
5802-
ASSERT_NE(nullptr, gfxPaddedAllocation);
5803-
EXPECT_TRUE(gfxAllocation.isLocked());
5804-
memoryManager->freeGraphicsMemoryImpl(gfxPaddedAllocation);
5805-
}
5806-
5807-
TEST_F(DrmMemoryManagerTest, whenCallPaddedAllocationWithMmapPtrAndFailedMmapCalledThenReturnNullptr) {
5808-
mock->ioctl_expected.gemMmap = 1;
5809-
mock->ioctl_res = -1;
5810-
5811-
BufferObject bo(mock, 3, 1, 1024, 0);
5812-
5813-
void *cpuPtr = (void *)0x30000;
5814-
size_t size = 0x1000;
5815-
DrmAllocation gfxAllocation(rootDeviceIndex, AllocationType::UNKNOWN, &bo, cpuPtr, size, (osHandle)1u, MemoryPool::MemoryNull);
5816-
gfxAllocation.setMmapPtr(cpuPtr);
5817-
gfxAllocation.setMmapSize(size);
5818-
auto gfxPaddedAllocation = memoryManager->createPaddedAllocation(&gfxAllocation, size);
5819-
ASSERT_EQ(nullptr, gfxPaddedAllocation);
5820-
mock->ioctl_res = 0;
5821-
}
5822-
58235717
TEST_F(DrmMemoryManagerTest, GivenEligbleAllocationTypeWhenCheckingAllocationEligbleForCompletionFenceThenReturnTrue) {
58245718
AllocationType validAllocations[] = {
58255719
AllocationType::COMMAND_BUFFER,

opencl/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,6 @@ TEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenAllocatingWithGpuV
569569
EXPECT_EQ(nullptr, allocation);
570570
}
571571

572-
TEST_F(WddmMemoryManagerTest, givenDefaultWddmMemoryManagerWhenAskedForVirtualPaddingSupportThenFalseIsReturned) {
573-
EXPECT_FALSE(memoryManager->peekVirtualPaddingSupport());
574-
}
575-
576572
TEST_F(WddmMemoryManagerTest, GivenGraphicsAllocationWhenAddAndRemoveAllocationToHostPtrManagerThenFragmentHasCorrectValues) {
577573
void *cpuPtr = (void *)0x30000;
578574
size_t size = 0x1000;

shared/source/gmm_helper/gmm.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ void Gmm::setupImageResourceParams(ImageInfo &imgInfo, bool preferCompressed) {
129129
resourceParams.ArraySize = imageCount;
130130
resourceParams.Flags.Wa.__ForceOtherHVALIGN4 = hwHelper.hvAlign4Required();
131131
resourceParams.MaxLod = imgInfo.baseMipLevel + imgInfo.mipCount;
132-
if (imgInfo.imgDesc.imageRowPitch && imgInfo.imgDesc.fromParent) {
133-
resourceParams.OverridePitch = (uint32_t)imgInfo.imgDesc.imageRowPitch;
134-
resourceParams.Flags.Info.AllowVirtualPadding = true;
135-
}
136132

137133
applyAuxFlagsForImage(imgInfo, preferCompressed);
138134
}

0 commit comments

Comments
 (0)