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
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
> c