summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/translate
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/translate')
-rw-r--r--src/gallium/auxiliary/translate/translate_generic.c3
-rw-r--r--src/gallium/auxiliary/translate/translate_sse.c4
2 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c
index 96e35b0eb41..fdab0f34a1a 100644
--- a/src/gallium/auxiliary/translate/translate_generic.c
+++ b/src/gallium/auxiliary/translate/translate_generic.c
@@ -625,8 +625,7 @@ static ALWAYS_INLINE void PIPE_CDECL generic_run_one( struct translate_generic *
if (tg->attrib[attr].instance_divisor) {
index = start_instance;
- index += (instance_id - start_instance) /
- tg->attrib[attr].instance_divisor;
+ index += (instance_id / tg->attrib[attr].instance_divisor);
/* XXX we need to clamp the index here too, but to a
* per-array max value, not the draw->pt.max_index value
* that's being given to us via translate->set_buffer().
diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c
index a4f7b243c13..726a9b1e34b 100644
--- a/src/gallium/auxiliary/translate/translate_sse.c
+++ b/src/gallium/auxiliary/translate/translate_sse.c
@@ -1094,10 +1094,6 @@ static boolean init_inputs( struct translate_sse *p,
struct x86_reg tmp_EDX = p->tmp2_EDX;
struct x86_reg tmp_ECX = p->src_ECX;
- /* instance_num = instance_id - start_instance */
- x86_mov(p->func, tmp_EDX, start_instance);
- x86_sub(p->func, tmp_EAX, tmp_EDX);
-
/* TODO: Add x86_shr() to rtasm and use it whenever
* instance divisor is power of two.
*/