radv: restrict exported symbols with static llvm Like the gallium --version-script magic but for radv. The long term goal is to make LLVM support optional, remove it even, so let's keep the hunk in an if block. v2: fold if checks (Eric) v3 (Tomeu): Remove spaces within [] (Dylan) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (v1) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6203>
ac/llvm: handle static/shared llvm init separately Having a single init function works as expected for shared llvm, but when using a static llvm only one llvm will get initialized. This commit introduces 2 separate init function: - shared llvm = single public init function - static llvm = one init function for each module using llvm Fixes: 50d20dc055d ("ac/llvm: export ac_init_llvm_once in targets") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3376 Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6253>
radv: link with ld_args_build_id This is needed for radv_device_get_cache_uuid to work correctly. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6081>
meson: fix android vulkan build Android doesn't have `pthread_cancel()` and is unlikely to ever implement it [1], but `wsi_common_display.c` needs it (or an alternative). Let's just disable the platform on Android (as it used to be before 448eb19158f483d807ef). [1] https://android-review.googlesource.com/c/platform/bionic/+/1215779/1/docs/status.md Fixes: 448eb19158f483d807ef ("vulkan: automatically compile the `display` platform when available") Signed-off-by: Eric Engestrom <eric@engestrom.ch> Acked-by: Nataraj Deshpande <nataraj.deshpande@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5860>
vulkan: automatically compile the `display` platform when available Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
ac/llvm: export ac_init_llvm_once in targets If a program like mpv uses both radeon_dri.so (because --vo=gpu) and radeonsi_drv_video.so (because --hwdec=vaapi) then LLVM will be inialized twice. The commit exports the ac_init_llvm_once so there's only one instance of the function. See also 18b12bf5335 ("targets: export radeon winsys_create functions to silence LLVM warning") which implemented this workaround initially. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1377 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5648>
radv: Use common gfx10_format_table.h Save some python code and build time, as well as some code duplication. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>
meson: use gnu_symbol_visibility argument This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
meson: inline `inc_common` Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
radv: initial implementation of the driver internal layer SQTT This layer is used to emit SQTT user markers to command buffers. It currently only emits API markers but it will consolidated soon with barrier markers and more. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4031>
radv: add initial SQTT files generation support SQTT is also a file format (.rgp extension) that can be consumed by Radeon GPU Profiler for profiling purposes. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3900>
radv: add initial SQ Thread Trace support for GFX9 SQTT is a hardware block that collects thread trace data (like wave occupancy, timings, etc) for every draw/dispatch calls. It's only supported on GFX9 at the moment but I will add other generations support soon. This is the first step towards profiling with RADV! Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3900>
radv: implement a dummy winsys for creating devices without AMDGPU To allow developers to test the compiler backends without having any AMD GPUs. To create a null device, set eg. RADV_FORCE_FAMILY=polaris10 in your environment. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3872> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3872>
radv: Move argument declaration out of nir_to_llvm Now it's executed for ACO too. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
ac/nir, radv, radeonsi: Switch to using ac_shader_args Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Marek Olšák <marek.olsak@amd.com>
meson: move the generic symbols check arguments to a common variable Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviwed-by: Dylan Baker <dylan@pnwbakers>
meson: add variable to control the symbols checks Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviwed-by: Dylan Baker <dylan@pnwbakers>
radv: drop unnecessary xmlpool_options_h idep_xmlconfig already covers that Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
radv: add exported symbols check Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
radv: Deal with Android external formats. To abstract things a bit, this adds a helper function in radv_android.c. However, this means we have to link in radv_android.c on non-android as well, which means some scaffolding changes. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>