From 6b6b45403740144fa5ef2ce362a4c5b9fd0066b6 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Tue, 24 Aug 2010 04:16:42 +0200 Subject: translate_sse: clear state for each function emission Fixes #29771. --- src/gallium/auxiliary/translate/translate_sse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c index 92dcd408c9d..f8bf5b46692 100644 --- a/src/gallium/auxiliary/translate/translate_sse.c +++ b/src/gallium/auxiliary/translate/translate_sse.c @@ -1255,6 +1255,9 @@ static boolean build_vertex_emit( struct translate_sse *p, int fixup, label; unsigned j; + memset(p->reg_to_const, 0xff, sizeof(p->reg_to_const)); + memset(p->const_to_reg, 0xff, sizeof(p->const_to_reg)); + p->tmp_EAX = x86_make_reg(file_REG32, reg_AX); p->idx_ESI = x86_make_reg(file_REG32, reg_SI); p->outbuf_EBX = x86_make_reg(file_REG32, reg_BX); @@ -1440,10 +1443,7 @@ struct translate *translate_sse2_create( const struct translate_key *key ) if (p == NULL) goto fail; memset(p, 0, sizeof(*p)); - memcpy(p->consts, consts, sizeof(consts)); - memset(p->reg_to_const, 0xff, sizeof(p->reg_to_const)); - memset(p->const_to_reg, 0xff, sizeof(p->const_to_reg)); p->translate.key = *key; p->translate.release = translate_sse_release; -- cgit v1.2.3