mesa: add ARB_shading_language_include stubs
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 5 Aug 2019 05:40:44 +0000 (15:40 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 20 Nov 2019 05:05:55 +0000 (05:05 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
src/mapi/glapi/gen/ARB_shading_language_include.xml [new file with mode: 0644]
src/mapi/glapi/gen/gl_API.xml
src/mapi/glapi/gen/static_data.py
src/mesa/main/shaderapi.c
src/mesa/main/shaderapi.h
src/mesa/main/tests/dispatch_sanity.cpp

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 (file)
index 0000000..c305a7e
--- /dev/null
@@ -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>
index a804e850f46821e26ac99d81283957106c319041..dff4e9560bcaabf508364060e028e5a1014f282c 100644 (file)
 <!-- 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"/>
index 176df719a23c118d0b2d6799a3b74475065089a9..22bdf003544c654bc4ee857f719282d9bce127c8 100644 (file)
@@ -1632,6 +1632,12 @@ offsets = {
     "VertexArrayVertexAttribBindingEXT": 1596,
     "VertexArrayVertexBindingDivisorEXT": 1597,
     "NamedBufferPageCommitmentEXT": 1598,
+    "NamedStringARB": 1599,
+    "DeleteNamedStringARB": 1600,
+    "CompileShaderIncludeARB": 1601,
+    "IsNamedStringARB": 1602,
+    "GetNamedStringARB": 1603,
+    "GetNamedStringivARB": 1604,
 }
 
 functions = [
index 8bca17a9352389f048e0d7f0e1b86cdfe5686fbc..7781609bc57baf1530f1929d0d349566b7867cad 100644 (file)
@@ -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)
 {
index 73fa90bbae934e2f3fee53f333ca77fa187945da..81318ca932bac694d58a08a25e1c396e40508963 100644 (file)
@@ -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);
 
index 8b892c6fec2748629ee6aa0b07a3b6eeb800b706..61201ee39b9ed3c9e3e65dc6ce419adacbb0585b 100644 (file)
@@ -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 },