MTLSurfaceData has a texture that is used for off-screen rendering.
It is by default MTLStorageMode.managed on macOS.
We encode render/blit commands on CPU, but entire rendering happens on the GPU. It makes sense to have the MTLSurfaceData texture as MTLStorageMode.private. A resource with a MTLStorageMode.private mode is accessible only to the GPU and allocated in video memory.
In Lanai workspace, after making this change, it was found that we cannot use MTLTexture.replaceRegion API on private textures. Hence that call needs to be replaced with blit command.
It is by default MTLStorageMode.managed on macOS.
We encode render/blit commands on CPU, but entire rendering happens on the GPU. It makes sense to have the MTLSurfaceData texture as MTLStorageMode.private. A resource with a MTLStorageMode.private mode is accessible only to the GPU and allocated in video memory.
In Lanai workspace, after making this change, it was found that we cannot use MTLTexture.replaceRegion API on private textures. Hence that call needs to be replaced with blit command.
- relates to
-
JDK-8245037 Lanai - MTLBlitLoops_CopyArea() needs to be optimized
-
- Closed
-