aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_state_vdecl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_vdecl.c')
-rw-r--r--src/gallium/drivers/svga/svga_state_vdecl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/svga/svga_state_vdecl.c b/src/gallium/drivers/svga/svga_state_vdecl.c
index 958d00393f2..7c393a1da8d 100644
--- a/src/gallium/drivers/svga/svga_state_vdecl.c
+++ b/src/gallium/drivers/svga/svga_state_vdecl.c
@@ -78,7 +78,6 @@ upload_user_buffers( struct svga_context *svga )
buffer->b.b.width0);
}
- pipe_resource_reference( &svga->curr.vb[i].buffer, buffer->uploaded.buffer );
svga->curr.vb[i].buffer_offset = buffer->uploaded.offset;
}
}
@@ -110,6 +109,7 @@ static int emit_hw_vs_vdecl( struct svga_context *svga,
for (i = 0; i < svga->curr.velems->count; i++) {
const struct pipe_vertex_buffer *vb = &svga->curr.vb[ve[i].vertex_buffer_index];
unsigned usage, index;
+ struct svga_buffer *buffer = svga_buffer(vb->buffer);
svga_generate_vdecl_semantics( i, &usage, &index );
@@ -127,6 +127,7 @@ static int emit_hw_vs_vdecl( struct svga_context *svga,
svga_hwtnl_vdecl( svga->hwtnl,
i,
&decl,
+ buffer->uploaded.buffer ? buffer->uploaded.buffer :
vb->buffer );
}
@@ -148,14 +149,10 @@ static int emit_hw_vdecl( struct svga_context *svga,
* userbuffers now and try to combine multiple userbuffers from
* multiple draw calls into a single host buffer for performance.
*/
- if (svga->curr.any_user_vertex_buffers &&
- SVGA_COMBINE_USERBUFFERS)
- {
+ if (svga->curr.any_user_vertex_buffers) {
ret = upload_user_buffers( svga );
if (ret)
return ret;
-
- svga->curr.any_user_vertex_buffers = FALSE;
}
return emit_hw_vs_vdecl( svga, dirty );