Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15, 6.2.2
-
None
Description
when debugging our customer issues, we found out:
1. Qt Allow the same egl created images used concurrently in two thread without sync , For this we don't have application to share, we have api trace below:
Thu Mar 10 11:25:16 CST 2022 [286767] (tid=0x63410160, gc=0x1e686770): glEGLImageTargetTexture2DOES 0x0DE1 0x1eaae9b0
.
.
Thu Mar 10 11:25:16 CST 2022 [286963] (tid=0x63410160, gc=0x1e686770): glDrawElements 0x0005 4 0x1403 0x52
Thu Mar 10 11:25:16 CST 2022 [286964] (tid=0x629b2160, gc=0x1e835ef0): glTexParameterf 0x0DE1 0x2801 9728.000000
Thu Mar 10 11:25:16 CST 2022 [286965] (tid=0x629b2160, gc=0x1e835ef0): glEGLImageTargetTexture2DOES 0x0DE1 0x1eaae9b0
You can see thread tid=0x63410160 target the egl created image 0x1eaae9b0 and doing some rendering, but another thread tid=0x629b2160 is calling glEGLImageTargetTexture2DOES concurrently to target and change it again. there is no sync between these two calls. There is race condition. It results in segmentation fault in our gpu driver.
2. Allow multiple calls eglBindWaylandDisplay in different hardware integration layers in qtwayland. egl wayland interface is global interface, it should be only called once. based on khronos specs, when egl wayland has already binded, the future eglBindWaylandDisplay will return false. In qtwayland, it makes hardware integration failed. If you want to call it multiple time, the right way is query wayland protocol, if it is already. binded, it is ok. It doesn't mean there is something wrong with gpu hardware and it shouldn't fail the qtwayland hardware integration.