Skip to content

svga: fix webgl basemark crash

Charmaine Lee requested to merge charmainel/mesa:fix-svga-dmabuf-ext into main

When an EGLImage is created from a 2D texture and used for texture sharing, the texture surface might not have been created with the SHARED bind flag. To allow these surfaces for sharing, this patch sets the USAGE SHARED bit for surfaces that can be potentially used for sharing even when the SHARED bind flag is not originally set. Instead of unconditionally enabling the SHARED bind flag for all surfaces and unnecessarily bypass the surface cache optimization, this patch only enables the USAGE SHARED bit for surfaces that also have the RENDER TARGET bind flag. When the surface handle is inquired and if the surface is currently marked as cachable, we will need to unset the cachable bit so the surface handle will not be recycled again.

Also fix compatible formats for shareable surfaces.

Merge request reports