mesa/src/gbm/main
Vincent Davis Jr 842ca28465 gbm/backend: fix gbm compile without dri
Commit introduces a fix that allows for gbm to be built with an empty
backend. There are situation especially in a Yocto/OE cross compilation
environment where you want to build with an empty backend. The particular
situation is as such:

The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
errors such as:

| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
                undefined reference to `gbm_dri_backend'
| collect2: error: ld returned 1 exit status

Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled

Add fix to bypasses compilation issue by excluding gbm dri backend. If
HAVE_DRI || HAVE_DRIX not specified.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447>
2023-01-13 22:29:29 +00:00
..
backend.c gbm/backend: fix gbm compile without dri 2023-01-13 22:29:29 +00:00
backend.h gbm: Give gbm_device a reference to its backend 2021-07-06 16:57:59 +00:00
gbm.c gbm: add GBM_FORMAT_[AX]BGR16161616 2022-07-27 07:27:10 +00:00
gbm.h gbm: Add USE_FRONT_RENDERING flag 2022-08-05 00:57:38 +00:00
gbm_abi_check.c gbm: assume USE_SCANOUT in create_with_modifiers 2021-10-01 00:02:36 +02:00
gbm_backend_abi.h gbm: assume USE_SCANOUT in create_with_modifiers 2021-10-01 00:02:36 +02:00
gbmint.h gbm: Move majority of gbmint.h to gbm_backend_abi.h 2021-07-06 16:57:59 +00:00