OSDN Git Service

i965: Discard bo->map_count
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 20 Jun 2017 10:57:34 +0000 (11:57 +0100)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 30 Jun 2017 22:54:52 +0000 (15:54 -0700)
commitc913241458be85fd5382d07a918a8e876296a3b6
treeab889bfdf17dd0b6dd14c7bf7a7cbe6c6dbc2171
parent58d81d9dc21b8fe719959d97890eb4fb2e390840
i965: Discard bo->map_count

Supposedly we were keeping a reference count for the number of users of
a mapping so that we could use valgrind to detect access to the map
outside of the valid section. However, we were incrementing the counter
only when first creating the cached mapping but decrementing on every
unmap. The bo->map_count tracking was wrong and so the debugging code
was completely useless.

v2 (Ken): Separate out atomic compare and swap optimization.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_bufmgr.c
src/mesa/drivers/dri/i965/brw_bufmgr.h