util: Rename PIPE_CDECL to UTIL_CDECL and moved into util/macros.h
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -67,6 +67,15 @@
|
||||
# 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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user