[Mesa-dev] [PATCH 2/4] i965: Use atomic ops in get_new_program_id().

Chris Wilson chris at chris-wilson.co.uk
Mon Sep 25 15:06:56 UTC 2017


Quoting Kenneth Graunke (2017-09-24 07:02:04)
> We have a nice utility function for this, which eliminates the need for
> locking stuff.  This isn't really performance critical, but it's less
> code to use the atomic.
> 
> p_atomic_inc_return does pre-increment rather than post-increment, so we
> change screen->program_id to be initialized to 0 instead of 1.  At which
> point, we can just delete the initialization because intel_screen is
> rzalloc'd.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the mesa-dev mailing list