[OpenJDK 2D-Dev] RFR: 8264318 Lanai: DrawHugeImageTest.java fails on apple M1
Sergey Bylokhov
serb at openjdk.java.net
Thu Apr 8 00:52:08 UTC 2021
On Wed, 7 Apr 2021 19:56:43 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Check if blit sizes are less than MTL_GPU_FAMILY_MAC_TXT_SIZE.
>>
>> It's safe since we copy tile from the image with memcpy.
>> // copy src pixels inside src bounds to buff
>> for (int row = 0; row < sh; row++) {
>> memcpy(buff.contents + (row * sw * srcInfo->pixelStride), raster, sw * srcInfo->pixelStride);
>> raster += (NSUInteger)srcInfo->scanStride;
>> }
>
> src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m line 162:
>
>> 160: const int sh = MIN(srcInfo->bounds.y2 - srcInfo->bounds.y1, MTL_GPU_FAMILY_MAC_TXT_SIZE);
>> 161: const int dw = MIN(dx2 - dx1, MTL_GPU_FAMILY_MAC_TXT_SIZE);
>> 162: const int dh = MIN(dy2 - dy1, MTL_GPU_FAMILY_MAC_TXT_SIZE);
>
> Just curious why such big coordinates are passed here. We should not be able to create a window of such size, as well as a volatile image.
Missed the MIN usage, initially read it as max.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3369
More information about the 2d-dev
mailing list