[Mesa-dev] [PATCH] mesa: Move declaration before code

Brian Paul brianp at vmware.com
Tue Mar 25 15:29:30 PDT 2014


Thanks, but I already pushed a fix for this earlier.

-Brian

On 03/25/2014 04:23 PM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Should fix MSVC build:
>
> src\mesa\main\pipelineobj.c(250) : error C2275: 'GLbitfield' : illegal use of this type as an expression
>          C:\hudson\workspace\mesa-msvc\include\GL/gl.h(127) : see declaration of 'GLbitfield'
> src\mesa\main\pipelineobj.c(250) : error C2146: syntax error : missing ';' before identifier 'any_valid_stages'
> src\mesa\main\pipelineobj.c(250) : error C2065: 'any_valid_stages' : undeclared identifier
> src\mesa\main\pipelineobj.c(252) : error C2065: 'any_valid_stages' : undeclared identifier
> src\mesa\main\pipelineobj.c(254) : error C2065: 'any_valid_stages' : undeclared identifier
>
> How long until we can require MSVC 2013 on Windows? :(
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Reported-by: Brian Paul <brianp at vmware.com>
> Cc: Brian Paul <brianp at vmware.com>
> ---
>   src/mesa/main/pipelineobj.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
> index 49fb641..f55251e 100644
> --- a/src/mesa/main/pipelineobj.c
> +++ b/src/mesa/main/pipelineobj.c
> @@ -227,6 +227,7 @@ _mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
>
>      struct gl_pipeline_object *pipe = lookup_pipeline_object(ctx, pipeline);
>      struct gl_shader_program *shProg = NULL;
> +   GLbitfield any_valid_stages;
>
>      if (!pipe) {
>         _mesa_error(ctx, GL_INVALID_OPERATION, "glUseProgramStages(pipeline)");
> @@ -247,7 +248,7 @@ _mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
>       * GL_TESS_CONTROL_SHADER_BIT
>       * GL_TESS_EVALUATION_SHADER_BIT
>       */
> -   GLbitfield any_valid_stages = GL_VERTEX_SHADER_BIT | GL_FRAGMENT_SHADER_BIT;
> +   any_valid_stages = GL_VERTEX_SHADER_BIT | GL_FRAGMENT_SHADER_BIT;
>      if (_mesa_has_geometry_shaders(ctx))
>         any_valid_stages |= GL_GEOMETRY_SHADER_BIT;
>
>



More information about the mesa-dev mailing list