mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 10:40:11 +01:00
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>
This commit is contained in:
parent
b260d9d91f
commit
bd4dbdfa51
1 changed files with 6 additions and 0 deletions
|
|
@ -49,5 +49,11 @@ _mesa_TextureBarrierNV(void)
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.NV_texture_barrier) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureBarrier(not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
ctx->Driver.TextureBarrier(ctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue