diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-26 00:09:02 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-26 00:09:02 +0100 |
commit | 721fb5597e687fc1446119002ab03cc428104b29 (patch) | |
tree | b7f9bde349a50b4e77473d2fa9202493055e0251 /src/gallium/auxiliary/draw/draw_vs_aos.c | |
parent | 9c7568965c00dcc2e9403a2f94f1cd09dcd783ae (diff) |
draw: more aos tweaks
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs_aos.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_aos.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c index 37d04e45a6..916203c66b 100644 --- a/src/gallium/auxiliary/draw/draw_vs_aos.c +++ b/src/gallium/auxiliary/draw/draw_vs_aos.c @@ -202,6 +202,7 @@ static struct x86_reg get_xmm_writable( struct aos_compilation *cp, reg = tmp; } + cp->xmm[reg.idx].last_used = cp->insn_counter; return reg; } @@ -215,6 +216,7 @@ static struct x86_reg get_xmm( struct aos_compilation *cp, reg = tmp; } + cp->xmm[reg.idx].last_used = cp->insn_counter; return reg; } @@ -281,6 +283,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. */ @@ -382,8 +396,16 @@ static struct x86_reg aos_get_shader_reg_xmm( struct aos_compilation *cp, unsigned file, unsigned idx ) { - struct x86_reg reg = aos_get_shader_reg( cp, file, idx ); - return get_xmm( cp, reg ); + struct x86_reg reg = get_xmm( cp, + aos_get_shader_reg( cp, file, idx ) ); + + aos_adopt_xmm_reg( cp, + reg, + file, + idx, + FALSE ); + + return reg; } |