On Tue, Nov 20, 2018 at 3:34 PM Ilia Mirkin <imir...@alum.mit.edu> wrote: > > 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.
Good idea, I'll use virgl_set_shader_images / virgl_set_shader_images / virgl_set_sampler_views to mark the relevant buffers as dirty. > Cheers, > > -ilia > On Tue, Nov 20, 2018 at 6:11 PM Gurchetan Singh > <gurchetansi...@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@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev