gallium: add PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE to skip util_range lock
authorMarek Olšák <marek.olsak@amd.com>
Thu, 26 Sep 2019 01:38:40 +0000 (21:38 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 8 Oct 2019 00:05:00 +0000 (20:05 -0400)
commit732ea0b213ce534c2ac05ced8ead2df8fa769efb
treef6d7168f59565a5e8d6e5f2e5409ff68d150a5fc
parent59dd4dafb5fea8a76e43d1280650b087809945a1
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 <kenneth@whitecape.org>
39 files changed:
src/gallium/auxiliary/util/u_range.h
src/gallium/auxiliary/util/u_threaded_context.c
src/gallium/auxiliary/util/u_upload_mgr.c
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_state.c
src/gallium/drivers/iris/iris_blit.c
src/gallium/drivers/iris/iris_clear.c
src/gallium/drivers/iris/iris_resource.c
src/gallium/drivers/iris/iris_state.c
src/gallium/drivers/nouveau/nouveau_buffer.c
src/gallium/drivers/nouveau/nv50/nv50_state.c
src/gallium/drivers/nouveau/nv50/nv50_surface.c
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c
src/gallium/drivers/nouveau/nvc0/nvc0_state.c
src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
src/gallium/drivers/nouveau/nvc0/nve4_compute.c
src/gallium/drivers/panfrost/pan_resource.c
src/gallium/drivers/r600/evergreen_hw_context.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_buffer_common.c
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_streamout.c
src/gallium/drivers/radeonsi/cik_sdma.c
src/gallium/drivers/radeonsi/si_buffer.c
src/gallium/drivers/radeonsi/si_cp_dma.c
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_dma.c
src/gallium/drivers/radeonsi/si_dma_cs.c
src/gallium/drivers/radeonsi/si_state_streamout.c
src/gallium/drivers/virgl/virgl_buffer.c
src/gallium/drivers/virgl/virgl_context.c
src/gallium/drivers/virgl/virgl_encode.c
src/gallium/drivers/virgl/virgl_query.c
src/gallium/drivers/virgl/virgl_resource.c
src/gallium/drivers/virgl/virgl_streamout.c
src/gallium/include/pipe/p_defines.h