From 33f2b45e265a388e783ababc8ec3440e08823114 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 18 Jul 2017 18:53:18 +0200 Subject: [PATCH] mesa: add KHR_no_error support to glBindSampler() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mapi/glapi/gen/ARB_sampler_objects.xml | 2 +- src/mesa/main/samplerobj.c | 7 +++++++ src/mesa/main/samplerobj.h | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/ARB_sampler_objects.xml b/src/mapi/glapi/gen/ARB_sampler_objects.xml index 9fe6c41c855..41fb1c0cca1 100644 --- a/src/mapi/glapi/gen/ARB_sampler_objects.xml +++ b/src/mapi/glapi/gen/ARB_sampler_objects.xml @@ -22,7 +22,7 @@ - + diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 260cff6450a..59ec813013e 100644 --- a/src/mesa/main/samplerobj.c +++ b/src/mesa/main/samplerobj.c @@ -318,6 +318,13 @@ bind_sampler(struct gl_context *ctx, GLuint unit, GLuint sampler, bool no_error) _mesa_bind_sampler(ctx, unit, sampObj); } +void GLAPIENTRY +_mesa_BindSampler_no_error(GLuint unit, GLuint sampler) +{ + GET_CURRENT_CONTEXT(ctx); + bind_sampler(ctx, unit, sampler, true); +} + void GLAPIENTRY _mesa_BindSampler(GLuint unit, GLuint sampler) { diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h index eb20df1040d..76c2c124242 100644 --- a/src/mesa/main/samplerobj.h +++ b/src/mesa/main/samplerobj.h @@ -110,6 +110,10 @@ void GLAPIENTRY _mesa_DeleteSamplers(GLsizei count, const GLuint *samplers); GLboolean GLAPIENTRY _mesa_IsSampler(GLuint sampler); + +void GLAPIENTRY +_mesa_BindSampler_no_error(GLuint unit, GLuint sampler); + void GLAPIENTRY _mesa_BindSampler(GLuint unit, GLuint sampler); -- 2.30.2