Skip to content
Permalink
Browse files
8264318: Lanai: DrawHugeImageTest.java fails on apple M1
Reviewed-by: serb, jdv
  • Loading branch information
Denis Konoplev authored and jayathirthrao committed Apr 15, 2021
1 parent 81877f7 commit 0fee6ecac21b232b203c9b2a2cd2a9a6c125d163
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m
@@ -156,10 +156,11 @@ void drawTex2Tex(MTLContext *mtlc,
replaceTextureRegion(MTLContext *mtlc, id<MTLTexture> dest, const SurfaceDataRasInfo *srcInfo,
const MTLRasterFormatInfo *rfi,
int dx1, int dy1, int dx2, int dy2) {
const int sw = srcInfo->bounds.x2 - srcInfo->bounds.x1;
const int sh = srcInfo->bounds.y2 - srcInfo->bounds.y1;
const int dw = dx2 - dx1;
const int dh = dy2 - dy1;
const int sw = MIN(srcInfo->bounds.x2 - srcInfo->bounds.x1, MTL_GPU_FAMILY_MAC_TXT_SIZE);
const int sh = MIN(srcInfo->bounds.y2 - srcInfo->bounds.y1, MTL_GPU_FAMILY_MAC_TXT_SIZE);
const int dw = MIN(dx2 - dx1, MTL_GPU_FAMILY_MAC_TXT_SIZE);
const int dh = MIN(dy2 - dy1, MTL_GPU_FAMILY_MAC_TXT_SIZE);

if (dw < sw || dh < sh) {
J2dTraceLn4(J2D_TRACE_ERROR, "replaceTextureRegion: dest size: (%d, %d) less than source size: (%d, %d)", dw, dh, sw, sh);
return;

1 comment on commit 0fee6ec

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 0fee6ec Apr 15, 2021

Please sign in to comment.