[Mesa-dev] [PATCH 06/42] mesa: add KHR_no_error support for glCreateShader() and glCreateShaderObjectARB()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Jun 27 11:20:09 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mapi/glapi/gen/gl_API.xml | 4 ++--
src/mesa/main/shaderapi.c | 16 ++++++++++++++++
src/mesa/main/shaderapi.h | 6 ++++++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 94589464c5c..415ed6a98bb 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -5318,7 +5318,7 @@
<glx ignore="true"/>
</function>
- <function name="CreateShader" es2="2.0">
+ <function name="CreateShader" es2="2.0" no_error="true">
<param name="type" type="GLenum"/>
<return type="GLuint"/>
<glx ignore="true"/>
@@ -7687,7 +7687,7 @@
<glx ignore="true"/>
</function>
- <function name="CreateShaderObjectARB">
+ <function name="CreateShaderObjectARB" no_error="true">
<param name="shaderType" type="GLenum"/>
<return type="GLhandleARB"/>
<glx ignore="true"/>
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 52bf0bfaff3..b01afcaf71f 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1398,6 +1398,14 @@ _mesa_CompileShader(GLuint shaderObj)
GLuint GLAPIENTRY
+_mesa_CreateShader_no_error(GLenum type)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return create_shader(ctx, type);
+}
+
+
+GLuint GLAPIENTRY
_mesa_CreateShader(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
@@ -1410,6 +1418,14 @@ _mesa_CreateShader(GLenum type)
GLhandleARB GLAPIENTRY
+_mesa_CreateShaderObjectARB_no_error(GLenum type)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return create_shader(ctx, type);
+}
+
+
+GLhandleARB GLAPIENTRY
_mesa_CreateShaderObjectARB(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index 3f6c0ff0cba..ccc38d9f75e 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -86,6 +86,9 @@ _mesa_CompileShader(GLuint);
extern GLhandleARB GLAPIENTRY
_mesa_CreateProgramObjectARB(void);
+GLhandleARB GLAPIENTRY
+_mesa_CreateShaderObjectARB_no_error(GLenum type);
+
extern GLhandleARB GLAPIENTRY
_mesa_CreateShaderObjectARB(GLenum type);
@@ -164,6 +167,9 @@ _mesa_AttachShader_no_error(GLuint program, GLuint shader);
extern void GLAPIENTRY
_mesa_AttachShader(GLuint program, GLuint shader);
+GLuint GLAPIENTRY
+_mesa_CreateShader_no_error(GLenum);
+
extern GLuint GLAPIENTRY
_mesa_CreateShader(GLenum);
--
2.13.2
More information about the mesa-dev
mailing list