On Wed, 31 Mar 2021 07:27:45 GMT, Jayathirth D V <j...@openjdk.org> wrote:
> In MTLBlitLoops.copyArea() we use standalone encoder which has no clip state > information because of which we ignore clip parameters set in rect clip and > shape clip. We need to query and use encoders from EncoderManager to honour > clip states in copyArea. src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLTexurePool.m line 206: > 204: mipmapped:NO]; > 205: textureDescriptor.usage = MTLTextureUsageRenderTarget | > 206: MTLTextureUsageShaderRead; In copyArea we use intermediate texture queried from TexturePool as render target. If we dont set any MTLTextureUsage, we are getting assertion errors when Metal API validation is enabled because by default we can only do texture shader read(https://developer.apple.com/documentation/metal/mtltexturedescriptor/1515783-usage?language=objc). To avoid these assertion errors in Metal API validation we need to set appropriate MTLTextureUsage parameters. ------------- PR: https://git.openjdk.java.net/jdk/pull/3283