diff options
author | José Fonseca <[email protected]> | 2010-04-26 14:49:42 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-04-26 16:05:06 +0100 |
commit | fc431a58dc1446383edc11aec2a0b7de5b363e5e (patch) | |
tree | 6857e13f0b44bb5e24a4c7ebf66c68478249dd87 /src/gallium/auxiliary/translate/translate_sse.c | |
parent | b02f1c86f5bf8b1169776975491c7df929e94e2c (diff) |
translate: Take and respect a max_index argument.
Diffstat (limited to 'src/gallium/auxiliary/translate/translate_sse.c')
-rw-r--r-- | src/gallium/auxiliary/translate/translate_sse.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c index c13e7427387..ef3aa674a34 100644 --- a/src/gallium/auxiliary/translate/translate_sse.c +++ b/src/gallium/auxiliary/translate/translate_sse.c @@ -61,6 +61,7 @@ typedef void (PIPE_CDECL *run_elts_func)( struct translate *translate, struct translate_buffer { const void *base_ptr; unsigned stride; + unsigned max_index; }; struct translate_buffer_varient { @@ -423,6 +424,11 @@ static boolean init_inputs( struct translate_sse *p, } else { x86_mov(p->func, tmp_EAX, elt); } + + /* + * TODO: Respect translate_buffer::max_index. + */ + x86_imul(p->func, tmp_EAX, buf_stride); x86_add(p->func, tmp_EAX, buf_base_ptr); @@ -666,13 +672,15 @@ static boolean build_vertex_emit( struct translate_sse *p, static void translate_sse_set_buffer( struct translate *translate, unsigned buf, const void *ptr, - unsigned stride ) + unsigned stride, + unsigned max_index ) { struct translate_sse *p = (struct translate_sse *)translate; if (buf < p->nr_buffers) { p->buffer[buf].base_ptr = (char *)ptr; p->buffer[buf].stride = stride; + p->buffer[buf].max_index = max_index; } if (0) debug_printf("%s %d/%d: %p %d\n", |