[Mesa-dev] [PATCH] virgl: don't mark buffers as unclean after a write
Ilia Mirkin
imirkin at alum.mit.edu
Tue Nov 20 23:34:42 UTC 2018
I'm unfamiliar with the surrounding code, but wanted to point out that
a single buffer may be mapped as a SSBO, UBO, TBO, etc.
transfer_map/unmap isn't really aware of how the buffer is used. You
can, however, keep track of such bindings on either the resource or
the context, and know that buffer X is currently bound as this and
this but not that.
Cheers,
-ilia
On Tue, Nov 20, 2018 at 6:11 PM Gurchetan Singh
<gurchetansingh at chromium.org> wrote:
>
> Texture buffers and SSBOs are always unclean, while other buffers
> are not modified by compute/rendering.
>
> This improves
>
> dEQP-GLES3.performance.buffer.data_upload.function_call.map_buffer_range.new_specified_buffer.flag_write_full.stream_draw
>
> from 9.58 MB/s to 451.17 MB/s.
>
> Regression tested using deqp-gles31 suite.
> ---
> src/gallium/drivers/virgl/virgl_buffer.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c
> index 88a22b56f9..f72c93f499 100644
> --- a/src/gallium/drivers/virgl/virgl_buffer.c
> +++ b/src/gallium/drivers/virgl/virgl_buffer.c
> @@ -106,7 +106,6 @@ static void virgl_buffer_transfer_unmap(struct pipe_context *ctx,
> if (trans->base.usage & PIPE_TRANSFER_WRITE) {
> if (!(transfer->usage & PIPE_TRANSFER_FLUSH_EXPLICIT)) {
> struct virgl_screen *vs = virgl_screen(ctx->screen);
> - vbuf->base.clean = FALSE;
> vctx->num_transfers++;
> vs->vws->transfer_put(vs->vws, vbuf->base.hw_res,
> &transfer->box, trans->base.stride, trans->base.layer_stride, trans->offset, transfer->level);
> --
> 2.18.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list