[Mesa-dev] [PATCH] mesa: per-texture locking

Brian Paul brianp at vmware.com
Tue Jun 11 08:40:05 PDT 2013


On 06/10/2013 02:35 PM, Frank Henigman wrote:
> Replace the one texture lock with a lock per texture.  This allows
> uploading textures from one thread concurrently with drawing in another
> thread.  _mesa_lock_context_textures() was used to check for texture
> updates from other contexts and also to acquire the texture lock.
> It's been replaced with _mesa_check_context_textures() which only does
> the checking.  Code sections that were between
> _mesa_lock_context_textures() and _mesa_unlock_context_textures()
> have been updated to lock individual textures as needed.
>
> No piglit regressions on pineview with intel driver.
> Passes new piglit test glx-multithread-texture.
>
> Signed-off-by: Frank Henigman <fjhenigman at google.com>

Reviewed-by: Brian Paul <brianp at vmware.com>

Thanks for doing this.  This is an area that's never been given as much 
thought as it deserves.  There's no doubt other areas in Mesa where 
shared objects and thread safety are lacking.




More information about the mesa-dev mailing list