diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2011-06-30 08:52:19 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2011-07-01 13:30:41 +0200 |
commit | 542194251c36e88601cb20b96a4094da5d0ae675 (patch) | |
tree | 28592a4f56d161647dadd867e8b20b15c64cfc78 /src/gallium/drivers/svga/svga_state_vdecl.c | |
parent | a8cf4b6acf9ee996090cc0bb95fa3558b481108c (diff) | |
download | external_mesa3d-542194251c36e88601cb20b96a4094da5d0ae675.zip external_mesa3d-542194251c36e88601cb20b96a4094da5d0ae675.tar.gz external_mesa3d-542194251c36e88601cb20b96a4094da5d0ae675.tar.bz2 |
svga: Fix multiple uploads of the same user-buffer.
If a user-buffer was referenced twice by a draw command, the affected ranges
were uploaded separately, with only the last one being referenced by the
hardware. Make sure we upload only a single range.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_vdecl.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_state_vdecl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_state_vdecl.c b/src/gallium/drivers/svga/svga_state_vdecl.c index 2375a02..47eab1a 100644 --- a/src/gallium/drivers/svga/svga_state_vdecl.c +++ b/src/gallium/drivers/svga/svga_state_vdecl.c @@ -82,8 +82,8 @@ static int emit_hw_vs_vdecl( struct svga_context *svga, continue; buffer = svga_buffer(vb->buffer); - if (buffer->source_offset > offset) { - tmp_neg_bias = buffer->source_offset - offset; + if (buffer->uploaded.start > offset) { + tmp_neg_bias = buffer->uploaded.start - offset; if (vb->stride) tmp_neg_bias = (tmp_neg_bias + vb->stride - 1) / vb->stride; neg_bias = MAX2(neg_bias, tmp_neg_bias); @@ -116,7 +116,7 @@ static int emit_hw_vs_vdecl( struct svga_context *svga, decl.array.offset = (vb->buffer_offset + ve[i].src_offset + neg_bias * vb->stride - - buffer->source_offset); + - buffer->uploaded.start); assert(decl.array.offset >= 0); |