[Mesa-dev] [PATCH 4/4] mesa: stop aliasing ARB and core shader API functions
Emil Velikov
emil.l.velikov at gmail.com
Sun Mar 9 13:30:01 PDT 2014
On 09/03/14 01:10, Brian Paul wrote:
> For example, we now we have separate dispatch functions for
> glCompileShader(GLuint) and glCompileShaderARB(GLhandleARB).
>
> With this change and the previous ones we should be able to build/run
> on MacOS again (where GLhandleARB is a void pointer, not a GLuint).
>
Hi Brian,
Wondering if with the drop of the aliases one would need to update the
gl function tables in dispatch_sanity.cpp. AFAICS it currently checks
the non ARB functions but does not list the ARB ones (unlike other
aliased functions).
Are they any special (apart from the ifdef APPLE piece in the spec) ?
Thanks
-Emil
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66346
> ---
> src/mapi/glapi/gen/gl_API.xml | 28 +++++++++++++++-------------
> src/mesa/main/dlist.c | 2 +-
> 2 files changed, 16 insertions(+), 14 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
> index 7e1946e..76f56c4 100644
> --- a/src/mapi/glapi/gen/gl_API.xml
> +++ b/src/mapi/glapi/gen/gl_API.xml
> @@ -7829,14 +7829,14 @@
> <glx ignore="true"/>
> </function>
>
> - <function name="ShaderSourceARB" alias="ShaderSource">
> + <function name="ShaderSourceARB" offset="assign">
> <param name="shader" type="GLhandleARB"/>
> <param name="count" type="GLsizei"/>
> <param name="string" type="const GLcharARB **"/>
> <param name="length" type="const GLint *"/>
> </function>
>
> - <function name="CompileShaderARB" alias="CompileShader">
> + <function name="CompileShaderARB" offset="assign">
> <param name="shader" type="GLhandleARB"/>
> </function>
>
> @@ -7851,15 +7851,17 @@
> <glx ignore="true"/>
> </function>
>
> - <function name="LinkProgramARB" alias="LinkProgram">
> + <function name="LinkProgramARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> </function>
>
> - <function name="UseProgramObjectARB" alias="UseProgram">
> + <function name="UseProgramObjectARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> + <glx ignore="true"/>
> + <glx ignore="true"/>
> </function>
>
> - <function name="ValidateProgramARB" alias="ValidateProgram">
> + <function name="ValidateProgramARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> </function>
>
> @@ -8014,13 +8016,13 @@
> <glx ignore="true"/>
> </function>
>
> - <function name="GetUniformLocationARB" alias="GetUniformLocation">
> + <function name="GetUniformLocationARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> <param name="name" type="const GLcharARB *"/>
> <return type="GLint"/>
> </function>
>
> - <function name="GetActiveUniformARB" alias="GetActiveUniform">
> + <function name="GetActiveUniformARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> <param name="index" type="GLuint"/>
> <param name="bufSize" type="GLsizei"/>
> @@ -8030,19 +8032,19 @@
> <param name="name" type="GLcharARB *"/>
> </function>
>
> - <function name="GetUniformfvARB" alias="GetUniformfv">
> + <function name="GetUniformfvARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> <param name="location" type="GLint"/>
> <param name="params" type="GLfloat *"/>
> </function>
>
> - <function name="GetUniformivARB" alias="GetUniformiv">
> + <function name="GetUniformivARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> <param name="location" type="GLint"/>
> <param name="params" type="GLint *"/>
> </function>
>
> - <function name="GetShaderSourceARB" alias="GetShaderSource">
> + <function name="GetShaderSourceARB" offset="assign">
> <param name="shader" type="GLhandleARB"/>
> <param name="bufSize" type="GLsizei"/>
> <param name="length" type="GLsizei *"/>
> @@ -8059,13 +8061,13 @@
> <enum name="OBJECT_ACTIVE_ATTRIBUTES_ARB" value="0x8B89"/>
> <enum name="OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB" value="0x8B8A"/>
>
> - <function name="BindAttribLocationARB" alias="BindAttribLocation">
> + <function name="BindAttribLocationARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> <param name="index" type="GLuint"/>
> <param name="name" type="const GLcharARB *"/>
> </function>
>
> - <function name="GetActiveAttribARB" alias="GetActiveAttrib">
> + <function name="GetActiveAttribARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> <param name="index" type="GLuint"/>
> <param name="bufSize" type="GLsizei"/>
> @@ -8075,7 +8077,7 @@
> <param name="name" type="GLcharARB *"/>
> </function>
>
> - <function name="GetAttribLocationARB" alias="GetAttribLocation">
> + <function name="GetAttribLocationARB" offset="assign">
> <param name="program" type="GLhandleARB"/>
> <param name="name" type="const GLcharARB *"/>
> <return type="GLint"/>
> diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
> index 6035ec0..b29b440 100644
> --- a/src/mesa/main/dlist.c
> +++ b/src/mesa/main/dlist.c
> @@ -8728,7 +8728,7 @@ _mesa_initialize_save_table(const struct gl_context *ctx)
> SET_BlitFramebuffer(table, save_BlitFramebufferEXT);
>
> SET_UseProgram(table, save_UseProgram);
> -// SET_UseProgramObjectARB(table, save_UseProgramObjectARB);
> + SET_UseProgramObjectARB(table, save_UseProgramObjectARB);
> SET_Uniform1f(table, save_Uniform1fARB);
> SET_Uniform2f(table, save_Uniform2fARB);
> SET_Uniform3f(table, save_Uniform3fARB);
>
More information about the mesa-dev
mailing list