diff options
author | Marek Olšák <[email protected]> | 2019-09-25 21:38:40 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-10-07 20:05:00 -0400 |
commit | 732ea0b213ce534c2ac05ced8ead2df8fa769efb (patch) | |
tree | f6d7168f59565a5e8d6e5f2e5409ff68d150a5fc /src/gallium/drivers/virgl/virgl_buffer.c | |
parent | 59dd4dafb5fea8a76e43d1280650b087809945a1 (diff) |
gallium: add PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE to skip util_range lock
u_upload_mgr sets it, so that util_range_add can skip the lock.
The time spent in tc_transfer_flush_region decreases from 0.8% to 0.2%
in torcs on radeonsi.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_buffer.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c index 9f999fec1fb..ba32c29ce2c 100644 --- a/src/gallium/drivers/virgl/virgl_buffer.c +++ b/src/gallium/drivers/virgl/virgl_buffer.c @@ -71,7 +71,7 @@ static void virgl_buffer_transfer_flush_region(struct pipe_context *ctx, * * We'll end up flushing 25 --> 70. */ - util_range_add(&trans->range, box->x, box->x + box->width); + util_range_add(transfer->resource, &trans->range, box->x, box->x + box->width); } static const struct u_resource_vtbl virgl_buffer_vtbl = |