Minor fixes and added support for NV_texture_barrier.
Authored by: spasi 2009-09-29
Parent: [r3242]
Child: [r3244]