mesa: Add ARB_direct_state_access checks in sampler object functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Fredrik Höglund 2015-05-10 20:55:31 +02:00
parent 36b0579337
commit 9e7149c898
1 changed files with 7 additions and 0 deletions

View File

@ -221,6 +221,13 @@ void GLAPIENTRY
_mesa_CreateSamplers(GLsizei count, GLuint *samplers)
{
GET_CURRENT_CONTEXT(ctx);
if (!ctx->Extensions.ARB_direct_state_access) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glCreateSamplers("
"GL_ARB_direct_state_access is not supported)");
return;
}
create_samplers(ctx, count, samplers, "glCreateSamplers");
}