Hi Duncan,

I haven't been paying much attention to mesa or X11 for a few years.  I'm just 
now looking back since I have some free cycles on vacation.  I see you did some 
work in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205 to get 
darwin/x11 to use gallium, but the way we go about it with macro definitions is 
quite confusing to me since we end up having macros that seem not well defined 
any more

Previously, GLX_USE_APPLEGL=1 meant "build a hacky libGL from the mesa sources 
in a mostly nonstandard way since we never got around to merging things 
together to make the implementation selectable at runtime" and 
GLX_USE_APPLEGL=0 meant "build a modern gallium libGL that you can use for 
swrast or IGLX but that doesn't work with hardware acceleration because we 
never got around to moving glx/apple into the modern era.  What does 
GLX_USE_APPLEGL mean now?

With the introduction of GLX_USE_APPLEGL=1 GLX_USE_APPLE=1, it seems that we're 
getting gallium but with some slight differences from the GLX_USE_APPLEGL=0 
case.

Relatedly, is GLX_USE_APPLEGL=0 GLX_USE_APPLE=1 expected to be a valid 
configuration?  If so, what does it mean?  It looks like the only difference 
between it and GLX_USE_APPLEGL=0 GLX_USE_APPLE=0 is at src/glx/glxext.c:1029:

  #if !defined(GLX_USE_APPLE)
     if (!dpyPriv->has_multibuffer && glx_accel && 
!debug_get_bool_option("LIBGL_KOPPER_DRI2", false)) {
        if (glx_driver & GLX_DRIVER_ZINK_YES) {
           CriticalErrorMessageF("DRI3 not available\n");
           goto init_fail;
        }
        glx_driver &= ~GLX_DRIVER_ZINK_INFER;
     }
  #endif

which seems maybe not intentional ... ? Why would we want that for 
GLX_USE_APPLEGL=1 GLX_USE_APPLE=1 but not GLX_USE_APPLEGL=1 GLX_USE_APPLE=0?

So I'm confused as to why we need two variables here.  I'd like to get us down 
to 0, whereby the OpenGL.framework backend is selectable at runtime rather than 
build time, and these changes you've made seem to make the build space a bit 
more complicated than they were before.

Can you walk me through the design decisions here?  I'd be happy to chat over 
Webex / Zoom / whatever if that would be easier.

Thanks,
Jeremy

Reply via email to