Mesa (master): st/mesa: try to fix MSVC build failure due to ALWAYS_INLINE

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 18 22:09:08 UTC 2020


Module: Mesa
Branch: master
Commit: 2491a2ddeb53f3d44b4633f967bfa5b023946bce
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2491a2ddeb53f3d44b4633f967bfa5b023946bce

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Feb 14 16:53:42 2020 -0500

st/mesa: try to fix MSVC build failure due to ALWAYS_INLINE

Fixes: 11db8e0e00a72884ba9f ("st/mesa: optimize st_update_array with ALWAYSINLINE")
Tested-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>

---

 src/mesa/state_tracker/st_atom_array.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c
index de03abea66d..b4af4c3e629 100644
--- a/src/mesa/state_tracker/st_atom_array.c
+++ b/src/mesa/state_tracker/st_atom_array.c
@@ -125,7 +125,10 @@ init_velement(const struct st_vertex_program *vp,
 /* ALWAYS_INLINE helps the compiler realize that most of the parameters are
  * on the stack.
  */
-void ALWAYS_INLINE
+void
+#ifndef _MSC_VER /* MSVC doesn't like inlining public functions */
+ALWAYS_INLINE
+#endif
 st_setup_arrays(struct st_context *st,
                 const struct st_vertex_program *vp,
                 const struct st_common_variant *vp_variant,



More information about the mesa-commit mailing list