On Mon, May 9, 2016 at 12:34 PM, Rob Clark <[email protected]> wrote:
> From: Rob Clark <[email protected]>
>
> We'll need this for a nir pass to lower builtin-uniform access.
>
> Signed-off-by: Rob Clark <[email protected]>
> Reviewed-by: Jason Ekstrand <[email protected]>
> ---
> src/compiler/glsl/builtin_variables.cpp | 23 ++++++++++++++---------
> src/compiler/glsl/ir.h | 3 +++
> 2 files changed, 17 insertions(+), 9 deletions(-)
>
> diff --git a/src/compiler/glsl/builtin_variables.cpp
> b/src/compiler/glsl/builtin_variables.cpp
> index f31f9f6..14bc0ef 100644
> --- a/src/compiler/glsl/builtin_variables.cpp
> +++ b/src/compiler/glsl/builtin_variables.cpp
> @@ -527,6 +527,18 @@ builtin_variable_generator::add_variable(const char
> *name,
> return var;
> }
>
> +extern "C" {
You can just mark the function extern "C" without the braces.
> +const struct gl_builtin_uniform_desc *
> +_mesa_glsl_get_builtin_uniform_desc(const char *name)
> +{
> + for (unsigned i = 0; _mesa_builtin_uniform_desc[i].name != NULL; i++) {
> + if (strcmp(_mesa_builtin_uniform_desc[i].name, name) == 0) {
> + return &_mesa_builtin_uniform_desc[i];
> + }
> + }
> + return NULL;
> +}
> +}
>
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev