radv: fix building with libdrm as a submodule
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

When building with libdrm as an internal fallback dependency, i.e.
a submodule, meson does not find `amdgpu.h` from the installed external
dep, failing to build with the following error:

-----------------------------------------------------------------------
In file included from ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c:10:
In file included from ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h:18:
../src/amd/common/ac_linux_drm.h:14:10: fatal error: 'amdgpu.h' file not found
   14 | #include "amdgpu.h"
      |          ^~~~~~~~~~
1 error generated.
-----------------------------------------------------------------------

Make libvulkan_radeon depend explicitly on dep_libdrm_amdgpu to also use
the include_directories declared for that dependency in case it's an
internal dependency.

Acked-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36932>
This commit is contained in:
Antonio Ospite 2025-08-13 10:48:58 +02:00 committed by Marge Bot
parent 18ef7b82c6
commit b39046b9ba

View file

@ -251,7 +251,7 @@ libvulkan_radeon = shared_library(
libamd_common, libamd_common_llvm, libamdgpu_addrlib,
],
dependencies : [
dep_llvm, dep_thread, dep_elf, dep_dl, dep_m,
dep_llvm, dep_libdrm_amdgpu, dep_thread, dep_elf, dep_dl, dep_m,
dep_valgrind, radv_deps, idep_aco,
idep_mesautil, idep_nir, idep_vulkan_util, idep_vulkan_wsi,
idep_vulkan_runtime, idep_amdgfxregs_h, idep_xmlconfig,