summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-01-27 02:03:16 +0100
committerMarek Olšák <[email protected]>2017-02-14 21:46:16 +0100
commit5fe53216335fa95dc956498c3bd927b48473d9ee (patch)
tree6c0ff0c18c3ad96c2c229a37d8b9e6ef9250f4dd /src
parent8a845859519e5594a62c38b55b76f7483b7fb932 (diff)
gallium/blitter: use the common uploader
Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Edmondo Tommasina <[email protected]> Tested-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 45dc0338f97..447d8d2281f 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -61,8 +61,6 @@ struct blitter_context_priv
{
struct blitter_context base;
- struct u_upload_mgr *upload;
-
float vertices[4][2][4]; /**< {pos, color} or {pos, texcoord} */
/* Templates for various state objects. */
@@ -316,9 +314,6 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
for (i = 0; i < 4; i++)
ctx->vertices[i][0][3] = 1; /*v.w*/
- ctx->upload = u_upload_create(pipe, 65536, PIPE_BIND_VERTEX_BUFFER,
- PIPE_USAGE_STREAM);
-
return &ctx->base;
}
@@ -491,7 +486,6 @@ void util_blitter_destroy(struct blitter_context *blitter)
pipe->delete_sampler_state(pipe, ctx->sampler_state_rect);
pipe->delete_sampler_state(pipe, ctx->sampler_state_linear);
pipe->delete_sampler_state(pipe, ctx->sampler_state);
- u_upload_destroy(ctx->upload);
FREE(ctx);
}
@@ -1214,11 +1208,11 @@ static void blitter_draw(struct blitter_context_priv *ctx,
vb.stride = 8 * sizeof(float);
- u_upload_data(ctx->upload, 0, sizeof(ctx->vertices), 4, ctx->vertices,
+ u_upload_data(pipe->stream_uploader, 0, sizeof(ctx->vertices), 4, ctx->vertices,
&vb.buffer_offset, &vb.buffer);
if (!vb.buffer)
return;
- u_upload_unmap(ctx->upload);
+ u_upload_unmap(pipe->stream_uploader);
pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, &vb);
util_draw_arrays_instanced(pipe, PIPE_PRIM_TRIANGLE_FAN, 0, 4,
@@ -2264,7 +2258,7 @@ void util_blitter_clear_buffer(struct blitter_context *blitter,
return;
}
- u_upload_data(ctx->upload, 0, num_channels*4, 4, clear_value,
+ u_upload_data(pipe->stream_uploader, 0, num_channels*4, 4, clear_value,
&vb.buffer_offset, &vb.buffer);
if (!vb.buffer)
goto out;