[Mesa-dev] [PATCH 019/101] mesa: add KHR_no_error support to glBindSampler()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Jul 21 17:39:28 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
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 9fe6c41c85..41fb1c0cca 100644
--- a/src/mapi/glapi/gen/ARB_sampler_objects.xml
+++ b/src/mapi/glapi/gen/ARB_sampler_objects.xml
@@ -22,7 +22,7 @@
<return type="GLboolean"/>
</function>
- <function name="BindSampler" es2="3.0">
+ <function name="BindSampler" es2="3.0" no_error="true">
<param name="unit" type="GLuint"/>
<param name="sampler" type="GLuint"/>
</function>
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index 5e29ada334..d182ee03c0 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -310,6 +310,13 @@ bind_sampler(struct gl_context *ctx, GLuint unit, GLuint sampler, bool no_error)
}
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)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h
index eb20df1040..76c2c12424 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.13.3
More information about the mesa-dev
mailing list