Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

8257566: Lanai: System runs out of application memory while running the Unmanaged_BufferredImage_draw_NearestNeighbor test multiple times #137

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -172,7 +172,7 @@ void drawTex2Tex(MTLContext *mtlc,
dw, dh, dx1, dy1);
// NOTE: we might want to fill alpha channel when !rfi->hasAlpha

id<MTLBuffer> buff = [mtlc.device newBufferWithLength:(sw * sh * srcInfo->pixelStride) options:MTLResourceStorageModeManaged];
id<MTLBuffer> buff = [[mtlc.device newBufferWithLength:(sw * sh * srcInfo->pixelStride) options:MTLResourceStorageModeManaged] autorelease];

// copy src pixels inside src bounds to buff
for (int row = 0; row < sh; row++) {
@@ -182,7 +182,7 @@ void drawTex2Tex(MTLContext *mtlc,
[buff didModifyRange:NSMakeRange(0, buff.length)];

if (rfi->swizzleKernel != nil) {
id <MTLBuffer> swizzled = [mtlc.device newBufferWithLength:(sw * sh * srcInfo->pixelStride) options:MTLResourceStorageModeManaged];
id <MTLBuffer> swizzled = [[mtlc.device newBufferWithLength:(sw * sh * srcInfo->pixelStride) options:MTLResourceStorageModeManaged] autorelease];

// this should be cheap, since data is already on GPU
id<MTLCommandBuffer> cb = [mtlc createCommandBuffer];