mesa: split _mesa_reference_program() into hot/cold paths.
authorDave Airlie <airlied@redhat.com>
Thu, 14 Jul 2011 14:09:21 +0000 (08:09 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 14 Jul 2011 14:09:38 +0000 (08:09 -0600)
commit323e4bff799a657632c5777c8be6e306202953af
treea6003e6d3624241d9c8fc301863539069cb0283f
parent8619aa5683eb16c12a1b2eaeab2378855791ec8c
mesa: split _mesa_reference_program() into hot/cold paths.

inline the hotpath of the reference remaining the same. This shouldn't
penalise the slow path at all but improve the hot path so we don't have
to jump to the function.

It also moves some assert checks under an #ifndef NDEBUG.

Minor clean-ups added by Brian.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/program/program.c
src/mesa/program/program.h