diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-27 10:42:58 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-27 10:42:58 +0100 |
commit | 4e2567f0ab6afd701bea4c35e388663e90f5cb6c (patch) | |
tree | 85b9964ac398a9362dae540259b64447921e41cb /src | |
parent | 2109ddafefde26dd20a1c6a25f594984143944a3 (diff) |
draw: some possible fixes for spilling
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_aos.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c index 1622358ae1..99630e4f75 100644 --- a/src/gallium/auxiliary/draw/draw_vs_aos.c +++ b/src/gallium/auxiliary/draw/draw_vs_aos.c @@ -253,6 +253,7 @@ struct x86_reg aos_get_xmm_reg( struct aos_compilation *cp ) cp->xmm[oldest].file = TGSI_FILE_NULL; cp->xmm[oldest].idx = 0; + cp->xmm[oldest].dirty = 0; cp->xmm[oldest].last_used = cp->insn_counter; return x86_make_reg(file_XMM, oldest); } @@ -284,24 +285,18 @@ void aos_adopt_xmm_reg( struct aos_compilation *cp, return; } - /* If this xmm reg is already holding this shader reg, just update - * last_used, and don't clobber the dirty flag... - */ - if (cp->xmm[reg.idx].file == file && - cp->xmm[reg.idx].idx == idx) - { - cp->xmm[reg.idx].dirty |= dirty; - cp->xmm[reg.idx].last_used = cp->insn_counter; - return; - } - /* If any xmm reg thinks it holds this shader reg, break the * illusion. */ for (i = 0; i < 8; i++) { if (cp->xmm[i].file == file && - cp->xmm[i].idx == idx) { + cp->xmm[i].idx == idx) + { + /* If an xmm reg is already holding this shader reg, take into account its + * dirty flag... + */ + dirty |= cp->xmm[i].dirty; aos_release_xmm_reg(cp, i); } } @@ -1989,6 +1984,17 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient, debug_printf("\n"); } + + { + unsigned i; + for (i = 0; i < 8; i++) { + if (cp.xmm[i].file != TGSI_FILE_OUTPUT) { + cp.xmm[i].file = TGSI_FILE_NULL; + cp.xmm[i].dirty = 0; + } + } + } + if (cp.error) goto fail; |