Skip to content
Commit 966c9907 authored by Pauli Nieminen's avatar Pauli Nieminen
Browse files

libdrm_radeon: Optimize cs_gem_reloc to do less looping.



bo->referenced_in_cs is checked if bo is already in cs. Adding and removing
reference in bo is done with atomic operations to allow parallel access to a
bo from multiple contexts.

cs->id generation code quarentees there is not duplicated ids which limits
number of cs->ids to 32. If there is more cs objects rest will get id 0.

V2:
 - Fix configure to check for atomics operations if libdrm_radeon is only selected.
 - Make atomic operations private to libdrm.

This optimization decreases cs_write_reloc share of torcs profiling from 4.3%
to 2.6%.

Tested-by: default avatarMichel Dänzer <michel@daenzer.net>
Signed-off-by: default avatarPauli Nieminen <suokkos@gmail.com>
parent 21105bc1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment