08:03luc: Hi, I am trying to use libgbm.so provided by mesa in my application, but it seems that dlsym() failed to find the symbol `gbmint_get_backend` in libgbm.so
08:03luc: https://elixir.bootlin.com/mesa/latest/source/src/gbm/main/backend.c#L126
08:05luc: do I misunderstand something?
08:06emersion: this is not a public API
08:13luc: emersion: is that expected if https://elixir.bootlin.com/mesa/latest/source/src/gbm/main/backend.c#L126 returns NULL?
08:14emersion: can you explain what you're trying to do?
08:14emersion: libgbm users are not expected to touch these internals
08:16luc: I am trying to get glamor worked on our own driver
08:17doras: Are you trying to write a GBM backend?
08:19luc: doras: No, you mean using libgbm.so requires the specific driver to implement a GBM backend?
08:19doras: Yes
08:22emersion: is your driver not a mesa driver?
08:22emersion: what driver is it?
08:23luc: that says, I have to implement `gbmint_get_backend` in my own GBM backend which is the dlopen()'ed `lib`?
08:24doras: If your driver is not in Mesa, yes.
08:25luc: emersion: No, it is a new Gallium-based driver
08:25emersion: oh, so it is mesa
08:26emersion: you shouldn't need to deal with any of this stuff, gallium implements what's required for GBM
08:26doras: Mesa provides an internal backend, so if you write your code in Mesa (even out-of-tree), you don't need an external backend.
08:26emersion: maybe your driver is missing capabilities that GBM needs?
08:26doras: I meant not "out-of-tree".
08:29luc: yes, we are doing our best improving it:)
08:31luc: emersion: doras: thank you for the explanation, i think i got it
08:34emersion: the code is a bit hard to follow, because there is a now-useless layer in-between GBM and Gallium, called DRI2
08:34emersion: the relevant places to look are
08:34emersion: dri2_init_screen_extensions()
08:35emersion: dri_screen_create_for_driver()
08:35emersion: former is what Gallium exposes as DRI2 API
08:35emersion: latter is what GBM needs from a DRI2 API
08:47psykose: just remove the dri2, so simple right :)
08:51dottedmag: It is a fully internal Mesa layer nowadays?
09:32emersion: yea
11:07AndrewR: apparently this one also can use (optionally) opencl: https://github.com/ggerganov/llama.cpp (not tested personally due to lack of hdd space)