summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-08-05 15:40:44 +1000
committerTimothy Arceri <[email protected]>2019-11-20 05:05:55 +0000
commit906f1a293312ecca60b6187b08a11afffe432796 (patch)
tree53538d7f427a5b9554114dc10bcfb4134fd846e6
parent4eb2a1dc6fc32a047d53620a929eae0bb255f9da (diff)
mesa: add ARB_shading_language_include stubs
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Witold Baryluk <[email protected]>
-rw-r--r--src/mapi/glapi/gen/ARB_shading_language_include.xml42
-rw-r--r--src/mapi/glapi/gen/gl_API.xml3
-rw-r--r--src/mapi/glapi/gen/static_data.py6
-rw-r--r--src/mesa/main/shaderapi.c35
-rw-r--r--src/mesa/main/shaderapi.h22
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp14
6 files changed, 115 insertions, 7 deletions
diff --git a/src/mapi/glapi/gen/ARB_shading_language_include.xml b/src/mapi/glapi/gen/ARB_shading_language_include.xml
new file mode 100644
index 00000000000..c305a7e2294
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_shading_language_include.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+<category name="GL_ARB_shading_language_include" number="76">
+ <function name="NamedStringARB">
+ <param name="type" type="GLenum" />
+ <param name="namelen" type="GLint" />
+ <param name="name" type="const GLchar *" />
+ <param name="stringlen" type="GLint" />
+ <param name="string" type="const GLchar *" />
+ </function>
+ <function name="DeleteNamedStringARB">
+ <param name="namelen" type="GLint" />
+ <param name="name" type="const GLchar *" />
+ </function>
+ <function name="CompileShaderIncludeARB">
+ <param name="shader" type="GLuint" />
+ <param name="count" type="GLsizei" />
+ <param name="path" type="const GLchar * const *" />
+ <param name="length" type="const GLint *" />
+ </function>
+ <function name="IsNamedStringARB">
+ <param name="namelen" type="GLint" />
+ <param name="name" type="const GLchar *" />
+ <return type="GLboolean"/>
+ </function>
+ <function name="GetNamedStringARB">
+ <param name="namelen" type="GLint" />
+ <param name="name" type="const GLchar *" />
+ <param name="bufSize" type="GLsizei" />
+ <param name="stringlen" type="GLint *" />
+ <param name="string" type="GLchar *" />
+ </function>
+ <function name="GetNamedStringivARB">
+ <param name="namelen" type="GLint" />
+ <param name="name" type="const GLchar *" />
+ <param name="pname" type="GLenum" />
+ <param name="params" type="GLint *" />
+ </function>
+</category>
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index a804e850f46..dff4e9560bc 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -8059,7 +8059,8 @@
<!-- ARB extension number 74 is a WGL extension. -->
<!-- ARB extension number 75 is a GLX extension. -->
-<!-- 76. GL_ARB_shading_language_include -->
+<xi:include href="ARB_shading_language_include.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<!-- 77. GL_ARB_texture_compression_bptc -->
<xi:include href="ARB_blend_func_extended.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py
index 176df719a23..22bdf003544 100644
--- a/src/mapi/glapi/gen/static_data.py
+++ b/src/mapi/glapi/gen/static_data.py
@@ -1632,6 +1632,12 @@ offsets = {
"VertexArrayVertexAttribBindingEXT": 1596,
"VertexArrayVertexBindingDivisorEXT": 1597,
"NamedBufferPageCommitmentEXT": 1598,
+ "NamedStringARB": 1599,
+ "DeleteNamedStringARB": 1600,
+ "CompileShaderIncludeARB": 1601,
+ "IsNamedStringARB": 1602,
+ "GetNamedStringARB": 1603,
+ "GetNamedStringivARB": 1604,
}
functions = [
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 8bca17a9352..7781609bc57 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -3138,6 +3138,41 @@ _mesa_GetProgramStageiv(GLuint program, GLenum shadertype,
}
}
+GLvoid GLAPIENTRY
+_mesa_NamedStringARB(GLenum type, GLint namelen, const GLchar *name,
+ GLint stringlen, const GLchar *string)
+{
+}
+
+GLvoid GLAPIENTRY
+_mesa_DeleteNamedStringARB(GLint namelen, const GLchar *name)
+{
+}
+
+GLvoid GLAPIENTRY
+_mesa_CompileShaderIncludeARB(GLuint shader, GLsizei count,
+ const GLchar* const *path, const GLint *length)
+{
+}
+
+GLboolean GLAPIENTRY
+_mesa_IsNamedStringARB(GLint namelen, const GLchar *name)
+{
+ return false;
+}
+
+GLvoid GLAPIENTRY
+_mesa_GetNamedStringARB(GLint namelen, const GLchar *name, GLsizei bufSize,
+ GLint *stringlen, GLchar *string)
+{
+}
+
+GLvoid GLAPIENTRY
+_mesa_GetNamedStringivARB(GLint namelen, const GLchar *name,
+ GLenum pname, GLint *params)
+{
+}
+
static int
find_compat_subroutine(struct gl_program *p, const struct glsl_type *type)
{
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index 73fa90bbae9..81318ca932b 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -381,6 +381,28 @@ extern GLvoid GLAPIENTRY
_mesa_GetProgramStageiv(GLuint program, GLenum shadertype,
GLenum pname, GLint *values);
+extern GLvoid GLAPIENTRY
+_mesa_NamedStringARB(GLenum type, GLint namelen, const GLchar *name,
+ GLint stringlen, const GLchar *string);
+
+extern GLvoid GLAPIENTRY
+_mesa_DeleteNamedStringARB(GLint namelen, const GLchar *name);
+
+extern GLvoid GLAPIENTRY
+_mesa_CompileShaderIncludeARB(GLuint shader, GLsizei count,
+ const GLchar* const *path, const GLint *length);
+
+extern GLboolean GLAPIENTRY
+_mesa_IsNamedStringARB(GLint namelen, const GLchar *name);
+
+extern GLvoid GLAPIENTRY
+_mesa_GetNamedStringARB(GLint namelen, const GLchar *name, GLsizei bufSize,
+ GLint *stringlen, GLchar *string);
+
+extern GLvoid GLAPIENTRY
+_mesa_GetNamedStringivARB(GLint namelen, const GLchar *name,
+ GLenum pname, GLint *params);
+
GLcharARB *
_mesa_read_shader_source(const gl_shader_stage stage, const char *source);
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 8b892c6fec2..61201ee39b9 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -675,12 +675,6 @@ const struct function common_desktop_functions_possible[] = {
{ "glBlendFunciARB", 43, -1 },
{ "glBlendFuncSeparateiARB", 43, -1 },
{ "glMinSampleShadingARB", 43, -1 }, // XXX: Add to xml
-// { "glNamedStringARB", 43, -1 }, // XXX: Add to xml
-// { "glDeleteNamedStringARB", 43, -1 }, // XXX: Add to xml
-// { "glCompileShaderIncludeARB", 43, -1 }, // XXX: Add to xml
-// { "glIsNamedStringARB", 43, -1 }, // XXX: Add to xml
-// { "glGetNamedStringARB", 43, -1 }, // XXX: Add to xml
-// { "glGetNamedStringivARB", 43, -1 }, // XXX: Add to xml
{ "glBindFragDataLocationIndexed", 43, -1 },
{ "glGetFragDataIndex", 43, -1 },
{ "glGenSamplers", 43, -1 },
@@ -1208,6 +1202,14 @@ const struct function common_desktop_functions_possible[] = {
{ "glBindImageTextures", 44, -1 },
{ "glBindVertexBuffers", 44, -1 },
+ /* GL_ARB_shading_language_include */
+ { "glNamedStringARB", 20, -1 },
+ { "glDeleteNamedStringARB", 20, -1 },
+ { "glCompileShaderIncludeARB", 20, -1 },
+ { "glIsNamedStringARB", 20, -1 },
+ { "glGetNamedStringARB", 20, -1 },
+ { "glGetNamedStringivARB", 20, -1 },
+
/* GL_KHR_debug/GL_ARB_debug_output */
{ "glPushDebugGroup", 11, -1 },
{ "glPopDebugGroup", 11, -1 },