diff options
author | Keith Whitwell <[email protected]> | 2008-04-15 19:14:31 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-04-15 19:14:31 +0100 |
commit | a5a7dc24ba2dcf9bbdd73709c4c182e324bdc3a5 (patch) | |
tree | e9ec2ea63e995f8d084913937595c1e383a33521 /src/gallium/auxiliary/translate/translate.h | |
parent | 08861688d3ca7a798345747a549597a52dcb6f98 (diff) |
gallium: Switch one vertex path over to new translate module
Will eventually do this for all instances where we are converting vertices
from one format to another.
Diffstat (limited to 'src/gallium/auxiliary/translate/translate.h')
-rw-r--r-- | src/gallium/auxiliary/translate/translate.h | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/translate/translate.h b/src/gallium/auxiliary/translate/translate.h index ac6bc7088bc..4f9f40e51a1 100644 --- a/src/gallium/auxiliary/translate/translate.h +++ b/src/gallium/auxiliary/translate/translate.h @@ -54,8 +54,17 @@ struct translate_element }; +struct translate_key { + unsigned output_stride; + unsigned nr_elements; + struct translate_element element[PIPE_MAX_ATTRIBS]; +}; + + struct translate { - void (*destroy)( struct translate * ); + struct translate_key key; + + void (*release)( struct translate * ); void (*set_buffer)( struct translate *, unsigned i, @@ -66,17 +75,30 @@ struct translate { const unsigned *elts, unsigned count, void *output_buffer); + + void (*run)( struct translate *, + unsigned start, + unsigned count, + void *output_buffer); }; -struct translate *translate_sse2_create( unsigned output_stride, - const struct translate_element *elements, - unsigned nr_elements ); +#if 0 +struct translate_context *translate_context_create( void ); +void translate_context_destroy( struct translate_context * ); + +struct translate *translate_lookup_or_create( struct translate_context *tctx, + const struct translate_key *key ); +#endif + + +/******************************************************************************* + * Private: + */ +struct translate *translate_sse2_create( const struct translate_key *key ); -struct translate *translate_generic_create( unsigned output_stride, - const struct translate_element *elements, - unsigned nr_elements ); +struct translate *translate_generic_create( const struct translate_key *key ); #endif |