Skip to content

gbm: lock and release buffer in swap buffers

Lina Versace requested to merge fjhenigman:swapbug into master

Created by: fjhenigman

Otherwise mesa prints "libEGL debug: EGL user error 0x300d (EGL_BAD_SURFACE) in dri2_swap_buffers" when environment variable EGL_LOG_LEVEL=debug.

You can see this by running waffle's gl_basic example. Every call to swap_buffers after the first one will cause this message to be printed. Though an error message is printed, no harm is done and no error is returned. I'm not sure why mesa does this, but assuming there's a reason, this lock/unlock seems to be what it wants us to do.

Merge request reports