util: Rename PIPE_CDECL to UTIL_CDECL and moved into util/macros.h
authorYonggang Luo <luoyonggang@gmail.com>
Fri, 18 Nov 2022 23:37:03 +0000 (07:37 +0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 24 Nov 2022 06:21:39 +0000 (06:21 +0000)
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/19918>

src/gallium/auxiliary/draw/draw_vs.h
src/gallium/auxiliary/draw/draw_vs_variant.c
src/gallium/auxiliary/translate/translate.h
src/gallium/auxiliary/translate/translate_generic.c
src/gallium/include/pipe/p_compiler.h
src/util/macros.h

index e31d237..2732a9d 100644 (file)
@@ -79,12 +79,12 @@ struct draw_vs_variant {
                       unsigned stride,
                       unsigned max_stride);
 
-   void (PIPE_CDECL *run_linear)(struct draw_vs_variant *shader,
+   void (UTIL_CDECL *run_linear)(struct draw_vs_variant *shader,
                                  unsigned start,
                                  unsigned count,
                                  void *output_buffer);
 
-   void (PIPE_CDECL *run_elts)(struct draw_vs_variant *shader,
+   void (UTIL_CDECL *run_elts)(struct draw_vs_variant *shader,
                                const unsigned *elts,
                                unsigned count,
                                void *output_buffer);
index 0c09b64..74ebf14 100644 (file)
@@ -149,7 +149,7 @@ do_viewport(struct draw_vs_variant_generic *vsvg,
 }
 
 
-static void PIPE_CDECL
+static void UTIL_CDECL
 vsvg_run_elts(struct draw_vs_variant *variant,
               const unsigned *elts,
               unsigned count,
@@ -214,7 +214,7 @@ vsvg_run_elts(struct draw_vs_variant *variant,
 }
 
 
-static void PIPE_CDECL
+static void UTIL_CDECL
 vsvg_run_linear(struct draw_vs_variant *variant,
                 unsigned start,
                 unsigned count,
index f3c2b44..27d7605 100644 (file)
@@ -86,28 +86,28 @@ struct translate_key {
 struct translate;
 
 
-typedef void (PIPE_CDECL *run_elts_func)(struct translate *,
+typedef void (UTIL_CDECL *run_elts_func)(struct translate *,
                                          const unsigned *elts,
                                          unsigned count,
                                          unsigned start_instance,
                                          unsigned instance_id,
                                          void *output_buffer);
 
-typedef void (PIPE_CDECL *run_elts16_func)(struct translate *,
+typedef void (UTIL_CDECL *run_elts16_func)(struct translate *,
                                            const uint16_t *elts,
                                            unsigned count,
                                            unsigned start_instance,
                                            unsigned instance_id,
                                            void *output_buffer);
 
-typedef void (PIPE_CDECL *run_elts8_func)(struct translate *,
+typedef void (UTIL_CDECL *run_elts8_func)(struct translate *,
                                           const uint8_t *elts,
                                           unsigned count,
                                           unsigned start_instance,
                                           unsigned instance_id,
                                           void *output_buffer);
 
-typedef void (PIPE_CDECL *run_func)(struct translate *,
+typedef void (UTIL_CDECL *run_func)(struct translate *,
                                     unsigned start,
                                     unsigned count,
                                     unsigned start_instance,
index 20e2de3..097058a 100644 (file)
@@ -584,7 +584,7 @@ get_emit_func(enum pipe_format format)
    }
 }
 
-static ALWAYS_INLINE void PIPE_CDECL
+static ALWAYS_INLINE void UTIL_CDECL
 generic_run_one(struct translate_generic *tg,
                 unsigned elt,
                 unsigned start_instance,
@@ -651,7 +651,7 @@ generic_run_one(struct translate_generic *tg,
 /**
  * Fetch vertex attributes for 'count' vertices.
  */
-static void PIPE_CDECL
+static void UTIL_CDECL
 generic_run_elts(struct translate *translate,
                  const unsigned *elts,
                  unsigned count,
@@ -669,7 +669,7 @@ generic_run_elts(struct translate *translate,
    }
 }
 
-static void PIPE_CDECL
+static void UTIL_CDECL
 generic_run_elts16(struct translate *translate,
                    const uint16_t *elts,
                    unsigned count,
@@ -687,7 +687,7 @@ generic_run_elts16(struct translate *translate,
    }
 }
 
-static void PIPE_CDECL
+static void UTIL_CDECL
 generic_run_elts8(struct translate *translate,
                   const uint8_t *elts,
                   unsigned count,
@@ -705,7 +705,7 @@ generic_run_elts8(struct translate *translate,
    }
 }
 
-static void PIPE_CDECL
+static void UTIL_CDECL
 generic_run(struct translate *translate,
             unsigned start,
             unsigned count,
index 7d1ddd8..ce5f0c8 100644 (file)
@@ -77,15 +77,6 @@ typedef unsigned char boolean;
 #define FALSE false
 #endif
 
-/* This should match linux gcc cdecl semantics everywhere, so that we
- * just codegen one calling convention on all platforms.
- */
-#ifdef _MSC_VER
-#define PIPE_CDECL __cdecl
-#else
-#define PIPE_CDECL
-#endif
-
 #if defined(__cplusplus)
 }
 #endif
index 399675f..8e0ee0a 100644 (file)
 #  define __builtin_types_compatible_p(type1, type2) (1)
 #endif
 
+/* This should match linux gcc cdecl semantics everywhere, so that we
+ * just codegen one calling convention on all platforms.
+ */
+#ifdef _MSC_VER
+#define UTIL_CDECL __cdecl
+#else
+#define UTIL_CDECL
+#endif
+
 /**
  * Static (compile-time) assertion.
  */