cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

skiadevtester
Journeyman III

Crash on AMD CPUs with multiple shared OpenGL contexts

Hi, I'm working on a Qt application that renders using two OpenGL contexts. One context is used to handle Qt draw calls and the other contexts render in another background thread using Skia (this is necessary because Skia and Qt don't play well with each other). The two threads are synchronized using fences (glFenceSync and glWaitSync). The skia thread renders everything on a FBO (the app is also using a tile rendering system where the content is first rendered on 256x256 FBOs and these are blitted on the bigger FBO) and then this is blitted onto the default framebuffer object on the Qt thread. This works quite well on Intel machines (I've tested this on 5 different machines), but not on AMD machines.

On AMD machines (tested with AMD 4600G integrated GPU and AMD Ryzen 7 2700U), the application hangs and stops working. This situation arise only when there is  "a lot" of draw calls that happen on the skia thread, if the number of draw calls is small (e.g. when the skia thread only draws a line) the issue doesn't appear.

This is most likely a driver bug (indeed the AMD Driver issue report opens up when the application hangs), but I'm not exactly what is the specific cause of it. If I call both Qt and Skia OpenGL commands in a single thread, the issue doesn't appear.

Any input on this would be much appreciated.

0 Likes
Reply
1 Reply
dipak
Staff
Staff

Re: Crash on AMD CPUs with multiple shared OpenGL contexts

Hi @skiadevtester ,

Thank you for reporting it. I'm moving the post to the OpenGL forum.

Also, you have been whitelisted for the AMD Devgurus community. 

Thanks.