Commit Graph

808 Commits

Author SHA1 Message Date
Dylan Baker 2653fe11c9 meson: use a feature option for lmsensors
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 202344e9a0 meson: use a feature option for libunwind
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 3f10a89180 meson: use a feature option for valgrind
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker d00c6e0fd7 meson: use a feature option for llvm
Still not as awesome as it should be, but an improvement over what we had
before.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker c40e1bb1d0 meson: use a feature option for gbm
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 6b334a8416 meson: use a feature option for gles2
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker ca615a4f16 meson: use a feature option for gles1
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 80eb78d7a4 meson: use a feature option for shared-glapi
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 98bd7cdb8c meson: use a feature option for shader_cache
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker b200d547dc meson: use a feature option for gallium-xa
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 6f66b89ac3 meson: use a feature option for gallium-va
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker eac76e433d meson: use a feature option for gallium-vdpau
Which we can use with the require method, and use the feature itself
as the require argument to dependency call. All of this results in less
code

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 8dcc1f8311 meson: use a feature option for dri3
This removes the deprecated 'true' and 'false' options, and uses a meson
feature, requiring significantly less code.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 643af2cf83 meson: drop meson < 0.54 workaround
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 3c5e969144 meson: replace uses of ExternalProgram.path with .full_path
The former is deprecated

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 92235e0c48 meson: replace has_exe_wrapper with can_run_host_binaries
The former is a deprecated alias for the latter, which more accurately
describes what the function does.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker 45632b3297 meson: bump minimum required version to meson 0.59
This gives us some utility methods for feature options, allowing even
simpler code. We can replace something like:
```meson
_opt = get_option('opt')
if _opt.auto()
  opt = host_machine.system() != 'windows'
else
  opt = opt.enabled()
endif
```
with
```meson
opt = get_option('opt') \
    .disable_auto_if(host_machine.system() != 'windows') \
    .allowed()
```

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Mike Blumenkrantz 48a0478126 zink: add renderdoc handling
renderdoc won't work with zink in frontends that aren't dri,
so ZINK_RENDERDOC should be used to specify start:end frames
to ensure that the vulkan command stream is captured

this is not a renderdoc issue: there are no frame boundaries in rusticl
or gallium-nine, so there is no possible way that renderdoc could
determine when/how to split frames

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20651>
2023-01-14 18:15:48 +00:00
Jesse Natalie a67f5f32a8 meson: Define VK_USE_PLATFORM_WIN32_KHR for C++
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>
2023-01-11 09:31:02 +00:00
pal1000 f69b43ae3e OpenCL/draw module: Support linking with LLVM and clang 15 static libraries
Cc: mesa-stable

Closes: #7243

Closes: #7487

Reviewed-by: Karol Herbst <kherbst@redhat.com>

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19009>
2022-12-16 16:52:48 +00:00
Jan Palus 8560ce28c2 vdpau: allow building vdpau st with virgl only
Fixes: 6b5aecb195 ("virgl: add support for hardware video acceleration")

Signed-off-by: Jan Palus <jpalus@fastmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20108>
2022-12-12 22:01:27 +00:00
David Heidelberg b19a14a094 nine: enable on panfrost
Also, enable required kmsro dependencies.

Tested-by: Aleksey Komarov <q4arus@ya.ru>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20238>
2022-12-10 10:56:09 +00:00
Danylo Piliaiev 1cfc413c9a meson: Do not enable drm for KGSL Turnip build
Android may use either DRM or some downstream solution, KGSL is a
downstream kernel driver for Adreno. Don't enable DRM when we want
Turnip to use KGSL instead of DRM.

Fixes: 09ac29cca9
("meson: Enable system_has_kms_drm for android")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20168>
2022-12-07 10:40:50 +00:00
Eric Engestrom 43eab9252e meson: sort drivers alphabetically in any-of checks
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19977>
2022-12-01 23:53:08 +00:00
Eric Engestrom 5479234d45 meson: make long any-of checks easier to read and to update
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19977>
2022-12-01 23:53:08 +00:00
Roman Stratiienko 09ac29cca9 meson: Enable system_has_kms_drm for android
This allows to build libgbm when  system = 'android'  is set in
the cross_file.

Cc: "22.3" "22.2" mesa-stable
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Acked-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20033>
2022-11-29 15:01:22 +00:00
Alyssa Rosenzweig bdc240e13e meson: Don't depend on expat for !use_xmlconfig
If we don't use xmlconfig, expat becomes an optional dependency on
Linux/BSD, which may be convenient for embedded systems that do not
otherwise need expat. (expat is so ubiquitous that this
probably doesn't matter a ton in practice, but fewer required Mesa deps
is probably nice anyway.)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
2022-11-23 23:14:10 +00:00
Philippe Lecluse a821dfbda5 intel: Add SUPPORT_INTEL_INTEGRATED_GPUS build argument
This is meant to remove any integrated GPU only code paths that can't
be compiled in CPU architectures different than x86.

Discrete GPUS don't have need_clflush set to true so it was just
matter of remove some code blocks around need_clflush but was left a
check in anv_physical_device_init_heaps() to fail physical device
initialization if it ever became false.

Signed-off-by: Philippe Lecluse <philippe.lecluse@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19812>
2022-11-23 16:57:23 +00:00
Danylo Piliaiev 703d85485f meson: do not use source_root() when possible
source_root() function is deprecated in Meson version 0.56.0 because
it returns the source root of the parent project if called from a
subproject.

Why would anyone need Mesa as a meson subproject?
It would be used as subproject in a project generated by command buffer
"decompiler" for Freedreno.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19901>
2022-11-22 06:11:07 +00:00
Jami Kettunen f3a9076e51 freedreno: Find curses properly for building fdperf
Upstream ncurses doesn't ship any legacy ncurses.pc pkg-config symlinks
(just ncursesw.pc) which Void Linux strictly follows[1] for example.

Meson (since 0.54) has a generic curses dependency which works perfectly
in this case[2], thus also bump the toplevel minimum meson version from
0.53.

[1] https://github.com/void-linux/void-packages/tree/master/srcpkgs/ncurses
[2] https://mesonbuild.com/Dependencies.html#curses

Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19664>
2022-11-17 23:57:05 +00:00
Jesse Natalie efe5b9163e meson: Enable initialized-but-unused warning for MSVC
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19792>
2022-11-17 21:20:38 +00:00
Jesse Natalie 2d04206673 meson: Enable SSE4.1 for MSVC
Modern MSVC always supports compiling with the SSE4.1 intrinsics with
no additional command line options, but doesn't have any options for
auto-vectorizing into SSE4.1.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16840>
2022-11-17 02:14:39 +00:00
Luis Felipe Strano Moraes d983827a62 meson: only enable intel-clc for x86_64 builds
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19662>
2022-11-11 07:35:27 +00:00
Lucas Stach 1d86188dc0 meson: enable Wmisleading-indentation
Clang enables it by default, but GCC does not. Enable it explicitly to
have some consistency between the supported compilers.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Eric Engestrom <eric@igalia.com>
Acked-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19439>
2022-11-11 01:56:28 +00:00
Dylan Baker 41a929d94c util/glsl2spirv: pass path to glslangValidator into the script
This allows users to override the location of glslang using normal meson
mechanisms.

Reviewed-by: Luis Felipe Strano Moraes <luis.strano@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19449>
2022-11-10 21:14:17 +00:00
Dylan Baker ae30c6c375 meson: prog_glslang should always be for the build machine
It doesn't produce different code when compiled for the host machine,
and this avoids needing two copies and possibly a host machine emulator
in cross compilation settings

Reviewed-by: Luis Felipe Strano Moraes <luis.strano@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19449>
2022-11-10 21:14:17 +00:00
Yonggang Luo 4d058a7034 meson: -DVK_ENABLE_BETA_EXTENSIONS at a single place
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19549>
2022-11-09 13:30:24 +00:00
David Heidelberg 39b9067b71 nine: enable on freedreno
nine-tests on Adreno 630:
 ~ 10000 passing
 ~ 85 failures

Acked-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19244>
2022-11-05 14:35:41 +00:00
Luis Felipe Strano Moraes 2842c04bf5 meson: simplified meson for enabling ray-tracing on Intel
Removed warning about deprecated usage that was not necessary.
Also added information on whether support is enabled or not to the
summary so it is easier to check when building.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19332>
2022-11-01 06:30:47 +00:00
Alyssa Rosenzweig db8ab52447 gallium: Stub support for Asahi + DRM
Copy-paste a pile of winsys code from panfrost and find-and-replace the name to
asahi. This should contain all the glue code needed for asahi+kmsro.

The kernel driver is under way (led by Asahi Lina, not me), but it's not
wred up here. My goal was rather to run shader-db, which expects a
render node, which means drm-shim, which means DRM loader support. With
this patch and a trivial drm-shim, shader-db runs.

In general I am reticent to touch UABI related code when the UABI hasn't been
finalized upstream, or started design at all, hence the RFC. Realistically this
patch assumes the following about the future UABI:

0. It will be a DRM driver. This is nonnegotiable.

1. The render node will be named "asahi". The other reasonable name would be
   "apple", which I'm using for the display controller (not yet upstream, but
   getting close).

2. Display and rendering will be split in the kernel, requiring kmsro in
   userspace, as agreed in past discussions.

   The 3D accelerator (AGX) and the display controller (DCP) are completely
   orthogonal blocks with separate lineages. True, Apple A14 (~= M1) has AGX and
   DCP together, and it seems like all the chips that will get upstream support
   will have this for the forseeable future. Nevertheless, it's a historical
   coincidence. Apple A12 had an AGX block with a pre-DCP Apple display
   controller, which would use a completely different display driver. Older SoCs
   had a PowerVR block with an Apple shader core, with a pre-DCP Apple display
   controller. Even older SoCs had a pure PowerVR block (+ Apple display).

   The AGX and DCP kernel drivers are not expected to share any nontrivial code.
   We don't gain anything by bundling them together. Likewise, the many
   codec blocks are completely orthogonal. This is all standard practice
   for Arm SoCs.

   It is true that AGX has never been used with a non-Apple display
   controller; it is highly unlikely this would change (either by AGX
   licensing out or something like Mali-DP getting licensed in). But
   an extra kmsro user doesn't actually add more complexity to Mesa, so
   shrug.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com> [meson, ack on gallium]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15940>
2022-10-29 12:04:41 -04:00
Yonggang Luo 5bed3d4ad6 meson: with_glx never assigned to 'gallium-xlib', remove 'gallium-xlib'
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19221>
2022-10-22 01:34:53 +00:00
Yonggang Luo 814682d00c meson: with_glx never assigned to 'gallium-xlib', so need add with_glx == 'xlib' for dep_glproto
Fixes: 76791db088 ("mesa/x11: Remove the swrast-classic-based fake libGL")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19221>
2022-10-22 01:34:53 +00:00
Yonggang Luo 399dc71a30 c11: Getting the macro guard of HAVE_PTHREAD in c11/threads.h to be consistence with util/u_uthread.h
The macro guard of #if defined(_WIN32) && !defined(__CYGWIN__) is comes from yohhoy's implementation
and that's not consistence with util/u_uthread.h, this caused it's hard to understand.
Now we change the behavior that's always rely on how meson detecting HAVE_PTHREAD.

So we always disable detecting of threads on Win32 as it's always included in the kernel32 library to
avoid detecting pthreads in mingw.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>
2022-10-20 03:04:56 +00:00
Yonggang Luo b6e4aa6f31 meson/mesa/wide: define WIN32_LEAN_AND_MEAN with pre_args
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>
2022-10-20 03:04:56 +00:00
Jesse Natalie 1868391732 deps: Update DirectX-Headers req to 1.606.4
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>
2022-10-20 00:30:21 +00:00
Sil Vilerino b557ceb75b frontends/va: Add windows VA frontend support via vl_winsys_win32 and libva-win32
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19063>
2022-10-19 00:45:48 +00:00
Yonggang Luo 2b64ff9284 util: Turn -DWINDOWS_NO_FUTEX to be pre_args
Turn -DWINDOWS_NO_FUTEX to be pre_args for not need add direct dependencies
to dep_futex for libraries and executables.
So only add dependencies to idep_mesautil is enough.

And this will make sure all source code are either using Windows futex,
or use mtx_t consistently across different sources, other than mixed usage of
futex and mtx_t before this commit.

If -DWINDOWS_NO_FUTEX is not globally available, that would cause
/src/util/simple_mtx.h:116: undefined reference to `futex_wait'

This error is raised when
 * compiled with -D min-windows-version=7
 * moved futex_wait from futex.h to futex.c
 * used simple_mtx_t in more codes

Or linkage error:
src/compiler/libcompiler.a.p/glsl_types.cpp.obj: in function `futex_wake':
/../../src/util/futex.h:154: undefined reference to `WaitOnAddress'
When:
 * compiled with -D min-windows-version=7
 * used simple_mtx_t in more codes

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7494
Fixes: c002bbeb2f ("util: Add a Win32 futex impl")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19087>
2022-10-16 05:21:45 +00:00
Simon Zeni c71006726e meson: remove unused EGL_NO_X11 definition
Last EGL header update changed the logic for the Xlib header inclusion. Now
the caller has to specify USE_X11 if they want the Xlib definitions.

Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18848>
2022-10-12 19:26:01 +00:00
pal1000 ed2743eae5 clc/clover: Link clang statically when shared-llvm is disabled
Makes things easier to handle when aiming for a static build

Cc: mesa-stable

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18117>
2022-10-10 12:20:30 +00:00
Mike Blumenkrantz 8cc766d8f7 remove xvmc
These seem abandoned and they make interfaces changes less easy.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18705>
2022-10-01 03:17:33 +00:00
Jordan Justen 9c6ed40925 meson: Define with_intel_vk_rt based on with_intel_clc
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16970>
2022-09-28 05:38:37 +00:00
Jordan Justen f7c82c72c4 meson: Deprecate vulkan-rt-drivers intel
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16970>
2022-09-28 05:38:37 +00:00
Lionel Landwerlin 262719e963 meson: bump required llvm-spirv version with intel-clc
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16970>
2022-09-28 05:38:36 +00:00
Yiwei Zhang e0b7430eae meson: libelf is optional
..otherwise seeing ERROR: C shared or static library 'elf' not found

Fixes: c74595ead3 ("radv/r600/clover: Getting libelf to be optional")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18805>
2022-09-25 05:49:39 +00:00
Xin LI 2905dd7951 meson: Improve detection of qsort_r().
Instead of trying to guess the interface style by solely checking
the OS name, check if a fake test program can be built and linked.
This will give more accurate result when FreeBSD and other systems
moved to the interface based on GNU qsort_r().

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18527>
2022-09-23 07:45:01 +00:00
Yonggang Luo c74595ead3 radv/r600/clover: Getting libelf to be optional
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18503>
2022-09-22 05:07:35 +00:00
James Park b7d4897df9 meson,amd: Remove Windows libelf wrap
Functionality isn't worth the maintenance cost.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18478>
2022-09-19 12:51:12 +00:00
Karol Herbst 5795ee0e08 rusticl: translate spirv to nir and first steps to kernel arg handling
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439>
2022-09-12 05:58:12 +00:00
Karol Herbst 20c90fed5a rusticl: added
Initial code drop for Rusticl :)

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439>
2022-09-12 05:58:12 +00:00
Kai Wasserbäch f9057cea51 fix(FTBFS): meson: raise C++ standard to C++17
LLVM 16 requires this since [0] and instead of just going all over the
various directories and adding overrides it should be easier to just
raise this globally. GCC supports C++17 since GCC 8 (2018), Clang since
version 5 (2017). Debian Buster (oldstable) has GCC 8.3 and Clang 7.0,
so all major distributions should have this and there shouldn't be an
issue with bumping.

[0] <b4e9977fc1>

Closes: <https://gitlab.freedesktop.org/mesa/mesa/-/issues/7031>
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17966>
2022-09-06 20:34:17 +00:00
Leo Liu 0b4d54360f meson: add with_gallium_virgl to allow it as VA backend driver
So that no longer needs other driver such as radeonsi as backend
to enable VA.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18424>
2022-09-06 19:27:49 +00:00
Lionel Landwerlin 50013ca9a5 intel: add a hasvk vulkan driver
This new driver is a copy of the current Anv code, it will only load
on gfx7/8 platforms though.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18208>
2022-09-02 09:40:45 +00:00
pal1000 f23dbcd642 meson: Only draw with llvm depends on native directly
Tests, softpipe or AMD drivers don't depend on it directly

Fixes: 3955dd07 ("meson/gallium: Add an option to not use LLVM for gallium draw module")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6817

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17675>
2022-09-02 03:24:20 +00:00
Yonggang Luo 1c861a18d7 meson: bump the minimal required llvm version to 5.0.0
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17813>
2022-09-02 01:51:42 +00:00
Kai Wasserbäch 559c027ade chore(deps): clover: raise the minimum LLVM version to 11.0.0
LLVM 11 was released in October 2020. If you want to build against
Mesa's Git version, that seems like enough time to upgrade to at least
LLVM 11 (Debian stable has this too).

It reduces the amount of #if gates we need and more will be incoming
again, given the Opaque Pointer transition.

Additionally radeonsi is already requiring LLVM 11. Therefore the
minimum will have been LLVM 11 for many builds anyway.

Note that clc is kept to LLVM 10 for the time being.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16047>
2022-08-23 19:23:05 +00:00
Martin Krastev 6e311dd722 meson: add svga gallium driver to 'auto' group on arm/aarch64
svga gallium driver is a good citizen on arm/aarch64 linux targets.
Enable that driver for -Dgallium-drivers=auto builds.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18186>
2022-08-23 00:10:03 +00:00
Yonggang Luo 0f9b662f9a meson: add enable-glcpp-tests option
these are too intermittent to be left enabled on CI for now

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
2022-08-22 14:18:53 +00:00
Yonggang Luo f97ba1f95d c11: #include <threads.h> when the os/platform provide it
Closes #6964

CC: mesa-stable

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18043>
2022-08-18 01:02:07 +00:00
pal1000 b5b855149c meson: Microsoft / maybe Intel CLC need the all-targets workaround
just like clover

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5666
Fixes: 1506ea2ecb ("Move a bunch of the CLC stuff from src/microsoft to common code")

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17682>
2022-08-12 17:39:20 +00:00
Jesse Natalie 1df92ed2a6 meson: Don't include glsl compiler if flex/bison aren't found
Use a disabler for not-found, which causes the GLSL targets to simply
not be generated if the tools don't exist.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17724>
2022-08-12 17:00:13 +00:00
Konstantin Kharlamov db11e300e9 meson: remove source_root() call in main meson.build
source_root function is deprecated in Meson version 0.56.0, so let's use
instead a current_source_dir() function, available in all Meson
versions.

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974>
2022-08-12 13:11:03 +00:00
Konstantin Kharlamov 91362340f3 meson: remove source_root() call in nir compiler path
source_root function is deprecated in Meson version 0.56.0, so let's use
instead a current_source_dir() function, available in all Meson
versions. This also allows to deduplicate some code by declaring
commonly used string at the top meson.build file.

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974>
2022-08-12 13:11:03 +00:00
Yonggang Luo 4752655649 egl/x11: implement ANGLE_sync_control_rate
Implement EGL_ANGLE_sync_control_rate for running Chromium Linux on Wayland with EGL backend.

Chromium works with this patch using(with videos playing smoothly):
/usr/bin/google-chrome-stable --use-gl=egl --enable-features=VaapiVideoDecoder --ignore-gpu-blocklist

Closes #2930

Signed-off-by: KJ Liew <liewkj@yahoo.com>
Signed-off-by: Térence Clastres <t.clastres@gmail.com>
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>
2022-08-09 21:02:50 +00:00
Yonggang Luo 1b7b74db06 meson: Cleanup usage dri_drivers as it's a dead option
Initial value of with_dri have no relation with dri_drivers.length()
Do not show useless `DRI drivers:`

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17821>
2022-08-04 19:07:06 +00:00
Yonggang Luo 56b0e3a575 meson: Place all pre_args about HAVE_DRI* into single place
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17821>
2022-08-04 19:07:06 +00:00
pal1000 ec46a85c4f d3d12/dzn/spirv2dxil: Require version library
Fixes: b8328c9 ("microsoft/compiler: Blacklist DXIL validator 1.6 from 20348 SDK")

Closes: #6952

Closes: #6959

v2: Always lookup version library on Windows

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17837>
2022-08-04 03:15:41 +00:00
Yonggang Luo 6af5cadef9 meson: Remove pre_args += '-DUSE_ELF_TLS'
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:12 +00:00
Yonggang Luo c8d296ae4b meson: Remove usage of use_elf_tls
After c47fd3dc00 ("windows: Use TLS context/dispatch with shared-glapi")

use_elf_tls are always setting to true, so we can remove it safety

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:11 +00:00
Yonggang Luo 14bbfee3bc gallium: Disable dri2 interface on OSX
Error message:
Undefined symbols for architecture x86_64:
  "_dri_kms_driver_extensions", referenced from:
      _swkmsCreateNewScreen in libdri.a(dri_util.c.o)
  "_galliumdrm_driver_extensions", referenced from:
      _dri2CreateNewScreen in libdri.a(dri_util.c.o)
ld: symbol(s) not found for architecture x86_64

Fixes: b6f7a4836a ("dri: Fill in the driver extensions for the legacy createNewScreen paths")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6519

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Yonggang Luo 48e72da0dd gallium: Rename macros HAVE_PIPE_LOADER*
Rename macro HAVE_PIPE_LOADER_DRI to HAVE_DRI
Rename macro HAVE_PIPE_LOADER_KMS to HAVE_DRISW_KMS

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Yonggang Luo 34572042c7 gallium: Move -DHAVE_PIPE_LOADER_DRI and -DHAVE_PIPE_LOADER_KMS to be pre_args
There is non pipe-loader source code depends on it.
After doing this, we found that shared library pipe_swrast depends on libswdri
The error message is:
src/gallium/targets/pipe-loader/pipe_swrast.so.p/pipe_swrast.c.o:pipe_swrast.c:swrast_driver_descriptor: error: undefined reference to 'dri_create_sw_winsys'
src/gallium/targets/pipe-loader/pipe_swrast.so.p/pipe_swrast.c.o:pipe_swrast.c:swrast_driver_descriptor: error: undefined reference to 'kms_dri_create_winsys'

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Dave Airlie 419b52f1de util: add reallocarray wrapper for win32
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17746>
2022-07-27 23:00:28 +00:00
Jesse Natalie c002bbeb2f util: Add a Win32 futex impl
This uses APIs that are not available on Win7. Since this is a build-time
configuration, and since we can't use the SDK version as an indicator
(since you can support Win7 via new SDKs), a new option is added to allow
disabling it, to maintain Win7 support if desired.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17431>
2022-07-15 21:31:51 +00:00
Jesse Natalie ddbbe96c88 Fix static glapi on Windows
On Linux, the static glapi path sees libGL.so implementing the static
glapi, and the drivers (libgallium_dri.so) updating/reading the TLS
vars.

On Windows, to allow libgallium_wgl.dll to be a full ICD, it's
responsible for implementing the actual static glapi. However, before
this change, OpenGL32.dll was also implementing the static glapi,
meaning that GL API calls from OpenGL32.dll didn't route to the driver
correctly because the TLS vars were never actually set - the driver set
its copy, and OpenGL32.dll read its own copy.

Now, always build a bridge and static version of glapi when not using
shared. The bridge version is linked into OpenGL32.dll, and the static
version is linked into the driver on Windows. GLES only builds with
shared glapi - but after this, shared glapi is not really needed on
Windows for GLES, since the driver has all of the data.

Fixes: f36921ef ("wgl: Refactor drivers to a libgallium_wgl.dll")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6560
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16713>
2022-07-14 20:01:22 +00:00
Michel Zou edc7f40a83 meson: drop dladdr check on win32
since !17208 there are 2 paths for disk_cache_get_function_identifier
on mingw: DETECT_OS_WINDOWS or HAVE_DLADDR (if dlfcn shims is present)

../src/util/disk_cache_os.c:47:1: error: redefinition of 'disk_cache_get_function_identifier'
   47 | disk_cache_get_function_identifier(void *ptr, struct mesa_sha1 *ctx)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/util/disk_cache_os.c:36:
../src/util/disk_cache.h:121:1: note: previous definition of 'disk_cache_get_function_identifier' with type '_Bool(void *, struct _SHA1_CTX *)'
  121 | disk_cache_get_function_identifier(void *ptr, struct mesa_sha1 *ctx)

here we disable the dladdr path from meson for consistency with msvc

fixes: 2dcbe8727

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17261>
2022-06-28 14:02:14 +00:00
Danylo Piliaiev ee6a0c675b meson: Define _GNU_SOURCE for android host system
Otherwise sched_getaffinity isn't be defined and util_cpu_detect_once
fails to compile.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17173>
2022-06-22 11:52:36 +03:00
Yonggang Luo c17a0d956a meson/clover: Getting clover can be built with no-rtti llvm in mingw
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17055>
2022-06-16 20:38:35 +00:00
Yonggang Luo 86f87dbe21 meson/rtti: Using get_argument_syntax to check msvc compatible compiler
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17055>
2022-06-16 20:38:35 +00:00
Yonggang Luo 2d934ac110 meson: Use cc.get_argument_syntax instead cc.get_id when possible.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17065>
2022-06-16 19:59:58 +00:00
Yonggang Luo b2ddec4e98 c11: Implement c11/time.h with c11/impl/time.c
Create c11/time.h instead of put timespec_get in `c11/threads.h`

Creating impl folder is used to avoid `#include <time.h>` point the c11/time.h file

Detecting if `struct timespec` present with meson
Define TIME_UTC in `c11/time.h` instead `c11/threads.h`
Define `struct timespec` in `c11/time.h` when not present.
Implement timespec_get in c11/impl/time.c instead threads.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:34 +00:00
Yonggang Luo a6dd77149a meson: Fixes timespec_get detect code
Add functions_to_detect dictionary to records the paths to include

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:33 +00:00
Jesse Natalie 3cd320c5fa meson: Use a C99 STDC_VERSION for flex
Fixes: 8575d0e8 ("meson: modernize win_flex stdint.h logic")
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16839>
2022-06-03 15:13:10 +00:00
Erik Faye-Lund c21dfe3348 meson: add back -Werror=vla to msvc compat flags
Back when STATIC_ASSERT was prepared for use in common code, the
-Werror=vla flag was removed from the MSVC compat flags. But now we're
using C++11 / C11 static asserts instead, so we can add it back again.

This should help us noticing some breakages before they happen.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund 8575d0e84b meson: modernize win_flex stdint.h logic
Since this logic was written, we've moved to require C11, so this can
now be simplified. First of all, we no longer need to set
__STDC_VERSION__ for C code at all, because the issue that MSVC doesn't
set __STDC_VERSION__ for C99 is longer a concern. Second, we can make
the C++ check unconditional.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>
2022-06-02 13:09:15 +00:00
Sil Vilerino e5ddd8ad94 meson: Add build option for gallium-d3d12-video feature
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6511
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16597>
2022-05-24 16:36:31 +00:00
Sil Vilerino 4a9e068a6e meson: Update DirectX-Headers dependency to 1.602.0 version with fallback to the wrap
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16597>
2022-05-24 16:36:31 +00:00
Sil Vilerino 82e4fc654f meson: Support d3d12 as a video-supporting driver
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Erik Faye-Lund 693c723211 zink: use run-time linking to loader
This makes Zink no longer have the vulkan-loader in the import-table,
which can prevent opengl32.dll on Windows from loading on systems
without the loader installed.

Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11550>
2022-05-13 16:23:41 +00:00
Georg Lehmann bf6372df62 meson: Tell glslang to be quiet.
Without --quiet glslang unconditionally prints the input file name to stdout.
Check if --quiet is supported because some distros only have ancient glslang
versions.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16312>
2022-05-04 11:30:43 +00:00
Erik Faye-Lund 5a62d00480 util: fix test on msvc
We also miss this function on MSVC. But let's use the functionality in
meson to check for supported functions instead of hand-rolling the list
here.

Fixes: 067023dce2 ("util: Add some unit tests of the half-float conversions.")
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16290>
2022-05-03 19:33:20 +00:00