Metal renderer threading issues [macOS]

Alan Bateman Alan.Bateman at oracle.com
Sun Oct 8 05:31:42 UTC 2023


On 07/10/2023 13:59, Alan Snyder wrote:
> I’ve been investigating a problem with a long running application that 
> accumulates an apparently unbounded number of
> CVDisplayLink threads. I do not yet have an explanation or a test case.
>
> The code that creates and releases CVDisplayLinks looks fine, but that 
> assumes there are no threading issues.
> It looks like there are threading issues.
>
> Specifically, it appears that the startDisplayLink and stopDisplayLink 
> methods of the Objective-C class MTLLayer are invoked on multiple threads.
>
> They are invoked on the AppKit main thread from screen sleep 
> notifications and blitTexture.
>
> They are invoked on the EDT from MTLLayer.validate.
>
> They are invoked on the Queue Flusher thread 
> from MTLRenderQueue.flushBuffer.
>
> Perhaps someone familiar with this code could comment?
>
It would be better to being this to client-lib-dev as that is where the 
metal pipeline is maintained.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20231008/a182a2ce/attachment.htm>


More information about the core-libs-dev mailing list