[Mesa-dev] [PATCH] st/nir: fix illegal designated initializer in st_glsl_to_nir.cpp
Caio Marcelo de Oliveira Filho
caio.oliveira at intel.com
Mon Sep 16 22:46:46 UTC 2019
> How about something simple like this instead:
>
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp
> b/src/mesa/state_tracker
> index d6a0264..4f5acfd 100644
> --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
> @@ -687,9 +687,14 @@ st_link_nir(struct gl_context *ctx,
> * st_nir_preprocess.
> */
> if (shader_program->data->spirv) {
> - static const gl_nir_linker_options opts = {
> - true /*fill_parameters */
> - };
> + /* Note: this object could be static const but designated
> + * initializers are not part of the C++ standard (allowed by GCC
> + * but not MSVC.)
> + */
> + gl_nir_linker_options opts = { 0 };
> +
> + opts.fill_parameters = true;
> +
> if (!gl_nir_link(ctx, shader_program, &opts))
> return GL_FALSE;
That looks fine to me.
Caio
More information about the mesa-dev
mailing list