diff options
author | Marek Olšák <[email protected]> | 2017-04-30 01:24:29 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-05-10 19:29:08 +0200 |
commit | 740ef228f735724f9d223e8160533c702337393e (patch) | |
tree | bf7db812e51a4f6a488c8dffc7f64a1f24b7997a /src/gallium | |
parent | 17f776c27be266f253194db9dc11764254b1fc86 (diff) |
radeonsi: remove upload code for zero-stride vertex attribs
st/mesa takes care of it now.
Tested-by: Edmondo Tommasina <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 1bac07e2341..130ffa0e23b 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3844,32 +3844,14 @@ static void si_set_vertex_buffers(struct pipe_context *ctx, for (i = 0; i < count; i++) { const struct pipe_vertex_buffer *src = buffers + i; struct pipe_vertex_buffer *dsti = dst + i; - - if (unlikely(src->is_user_buffer)) { - /* Zero-stride attribs only. */ - assert(src->stride == 0); - - /* Assume that the user_buffer comes from - * gl_current_attrib, which implies it has - * 4 * 8 bytes (for dvec4 attributes). - * - * Use const_uploader to upload into VRAM directly. - */ - u_upload_data(sctx->b.b.const_uploader, 0, 32, 32, - src->buffer.user, - &dsti->buffer_offset, - &dsti->buffer.resource); - dsti->stride = 0; - } else { - struct pipe_resource *buf = src->buffer.resource; - - pipe_resource_reference(&dsti->buffer.resource, buf); - dsti->buffer_offset = src->buffer_offset; - dsti->stride = src->stride; - r600_context_add_resource_size(ctx, buf); - if (buf) - r600_resource(buf)->bind_history |= PIPE_BIND_VERTEX_BUFFER; - } + struct pipe_resource *buf = src->buffer.resource; + + pipe_resource_reference(&dsti->buffer.resource, buf); + dsti->buffer_offset = src->buffer_offset; + dsti->stride = src->stride; + r600_context_add_resource_size(ctx, buf); + if (buf) + r600_resource(buf)->bind_history |= PIPE_BIND_VERTEX_BUFFER; } } else { for (i = 0; i < count; i++) { |