Re: [Mesa-dev] [PATCH] winsys/radeon: consolidate hash table lookup

2014-04-12 Thread Christian König
Am 12.04.2014 12:52, schrieb Marek Olšák: Do you mean having bo->cs and bo->index? That would work, but there would have to be mutex_lock and mutex_unlock when accessing the variables. I'm not sure if locking a mutex is more expensive than the hash table lookup. OpenGL with GLX allows sharing buf

Re: [Mesa-dev] [PATCH] winsys/radeon: consolidate hash table lookup

2014-04-12 Thread Marek Olšák
Do you mean having bo->cs and bo->index? That would work, but there would have to be mutex_lock and mutex_unlock when accessing the variables. I'm not sure if locking a mutex is more expensive than the hash table lookup. OpenGL with GLX allows sharing buffers and textures between contexts, so we mu

Re: [Mesa-dev] [PATCH] winsys/radeon: consolidate hash table lookup

2014-04-12 Thread Christian König
Am 11.04.2014 19:03, schrieb Marek Olšák: From: Marek Olšák Reviewed-by: Christian König BTW: I've always wondered if the custom hash table is the best approach here. Having a BO active in more than one command submission context at the same time sounds rather unlikely to me. Something

[Mesa-dev] [PATCH] winsys/radeon: consolidate hash table lookup

2014-04-11 Thread Marek Olšák
From: Marek Olšák I should have done this long ago. --- src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 110 +++--- src/gallium/winsys/radeon/drm/radeon_drm_cs.h | 7 +- 2 files changed, 49 insertions(+), 68 deletions(-) diff --git a/src/gallium/winsys/radeon/drm/radeon_dr