mesa: add check for NV_texture_barrier in _mesa_TextureBarrierNV()
authorBrian Paul <brianp@vmware.com>
Thu, 16 Apr 2015 21:27:41 +0000 (15:27 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 22 Apr 2015 14:58:05 +0000 (08:58 -0600)
commitbd4dbdfa519362f74263a2c277a3b4be841acd06
treea459a4c1d7d780828c7bd41525275a7329156454
parentb260d9d91f84f26676cf8baf42c6df88678be668
mesa: add check for NV_texture_barrier in _mesa_TextureBarrierNV()

If an app called glTextureBarrierNV() without checking if the
extension was available, we'd crash with some gallium drivers
in st_TextureBarrier() because the pipe_context::texture_barrier()
pointer was NULL.

Generate GL_INVALID_OPERATION instead.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/texturebarrier.c