Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8248301

Lanai - Change MTLStorageMode of MTLSurfaceData texture (render backbuffer) to private

XMLWordPrintable

    • 2d
    • x86_64
    • os_x

      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.

            aghaisas Ajit Ghaisas
            aghaisas Ajit Ghaisas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: