Skip to content

glx: fix regression for drawable type detection

Qiang Yu requested to merge yuq825/mesa:topic/fix-pbuffer-regression into main

Newer version of XServer supporting GLX_DRAWABLE_TYPE query also support query with raw X11 window ID besides GLXWindow ID. So we should not limit the suppported type to GLXPbuffer when query success.

Otherwise can't start GLX application on newer XServer with:

  libGL error: GLX drawable type is not supported
  libGL error: GLX drawable type is not supported
  X Error of failed request:  GLXBadContext
    Major opcode of failed request:  149 (GLX)
    Minor opcode of failed request:  5 (X_GLXMakeCurrent)
    Serial number of failed request:  35
    Current serial number in output stream:  35

Fixes: 6625c960 ("glx: check drawable type before create drawble")

Edited by Qiang Yu

Merge request reports