From 81d5afbbecce4ccf2b4bf10b10f47585febfe9c8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 25 Oct 2010 10:31:42 -0600 Subject: translate: use function typedefs, casts to silence warnings --- src/gallium/auxiliary/translate/translate.h | 54 +++++++++++++++++------------ 1 file changed, 31 insertions(+), 23 deletions(-) (limited to 'src/gallium/auxiliary/translate/translate.h') diff --git a/src/gallium/auxiliary/translate/translate.h b/src/gallium/auxiliary/translate/translate.h index a75380228b..34f2d97232 100644 --- a/src/gallium/auxiliary/translate/translate.h +++ b/src/gallium/auxiliary/translate/translate.h @@ -68,6 +68,33 @@ struct translate_key { }; +struct translate; + + +typedef void (PIPE_CDECL *run_elts_func)(struct translate *, + const unsigned *elts, + unsigned count, + unsigned instance_id, + void *output_buffer); + +typedef void (PIPE_CDECL *run_elts16_func)(struct translate *, + const uint16_t *elts, + unsigned count, + unsigned instance_id, + void *output_buffer); + +typedef void (PIPE_CDECL *run_elts8_func)(struct translate *, + const uint8_t *elts, + unsigned count, + unsigned instance_id, + void *output_buffer); + +typedef void (PIPE_CDECL *run_func)(struct translate *, + unsigned start, + unsigned count, + unsigned instance_id, + void *output_buffer); + struct translate { struct translate_key key; @@ -79,29 +106,10 @@ struct translate { unsigned stride, unsigned max_index ); - void (PIPE_CDECL *run_elts)( struct translate *, - const unsigned *elts, - unsigned count, - unsigned instance_id, - void *output_buffer); - - void (PIPE_CDECL *run_elts16)( struct translate *, - const uint16_t *elts, - unsigned count, - unsigned instance_id, - void *output_buffer); - - void (PIPE_CDECL *run_elts8)( struct translate *, - const uint8_t *elts, - unsigned count, - unsigned instance_id, - void *output_buffer); - - void (PIPE_CDECL *run)( struct translate *, - unsigned start, - unsigned count, - unsigned instance_id, - void *output_buffer); + run_elts_func run_elts; + run_elts16_func run_elts16; + run_elts8_func run_elts8; + run_func run; }; -- cgit v1.2.3