From 732ea0b213ce534c2ac05ced8ead2df8fa769efb Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 25 Sep 2019 21:38:40 -0400 Subject: 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 --- src/gallium/drivers/iris/iris_clear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/iris/iris_clear.c') diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index ff78352a9f2..b71d4f2886a 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -351,7 +351,7 @@ clear_color(struct iris_context *ice, } if (p_res->target == PIPE_BUFFER) - util_range_add(&res->valid_buffer_range, box->x, box->x + box->width); + util_range_add(&res->base, &res->valid_buffer_range, box->x, box->x + box->width); iris_batch_maybe_flush(batch, 1500); -- cgit v1.2.3