vulkan: use c_msvc_compat_args for shared code
Due to both Lavapipe on Windows and Dozen, we need to support MSVC in the shared Vulkan code. So let's make sure we compile with the compatibility flags for it. Techinically speaking, we also need this in the wsi subdir, because we also compile wsi_common_win32.c with MSVC. But wsi_common_wayland.c contains void-pointer arithmetic, causing compiler errors if we do. Fixing that properly is a bit more involved, because Meson doesn't love passing different compiler arguments per source-file. The alternative is to remove the void-pointer arithmetic, but that seems a bit pointless as this code will never be compiled on MSVC. So, let's leave that one out for now. We can probably do better in the future, but this gets us a step further. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6386 Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16162>
This commit is contained in:

committed by
Marge Bot

parent
e6bcdc763c
commit
6623f60c34
@@ -158,7 +158,7 @@ libvulkan_runtime = static_library(
|
|||||||
dependencies : vulkan_runtime_deps,
|
dependencies : vulkan_runtime_deps,
|
||||||
# For glsl_type_singleton
|
# For glsl_type_singleton
|
||||||
link_with : libcompiler,
|
link_with : libcompiler,
|
||||||
c_args : [vulkan_wsi_args],
|
c_args : [vulkan_wsi_args, c_msvc_compat_args],
|
||||||
gnu_symbol_visibility : 'hidden',
|
gnu_symbol_visibility : 'hidden',
|
||||||
build_by_default : false,
|
build_by_default : false,
|
||||||
)
|
)
|
||||||
|
@@ -98,7 +98,7 @@ libvulkan_util = static_library(
|
|||||||
[files_vulkan_util, vk_dispatch_table, vk_enum_to_str, vk_extensions],
|
[files_vulkan_util, vk_dispatch_table, vk_enum_to_str, vk_extensions],
|
||||||
include_directories : [inc_include, inc_src, inc_gallium],
|
include_directories : [inc_include, inc_src, inc_gallium],
|
||||||
dependencies : [vulkan_wsi_deps, idep_mesautil, idep_nir_headers],
|
dependencies : [vulkan_wsi_deps, idep_mesautil, idep_nir_headers],
|
||||||
c_args : [vulkan_wsi_args],
|
c_args : [vulkan_wsi_args, c_msvc_compat_args],
|
||||||
gnu_symbol_visibility : 'hidden',
|
gnu_symbol_visibility : 'hidden',
|
||||||
build_by_default : false,
|
build_by_default : false,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user