summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniforms.c
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2014-02-21 19:09:30 -0800
committerVinson Lee <[email protected]>2014-02-21 19:11:58 -0800
commit5a0b08e9ea5ee6075aee551b223e045e7506cb7d (patch)
treecc42d13519a0837adb5c366811e2fa8f371f8754 /src/mesa/main/uniforms.c
parentaaefc85f3b7c7bf5c0ab28344509ef4b291b4415 (diff)
mesa: Move declarations before code.
This patch fixes these MSVC build errors introduced with 73b78f9c9f86dd38fb165f4730aeac9519635b07. Compiling src\mesa\main\uniforms.c ... uniforms.c src\mesa\main\uniforms.c(291) : error C2143: syntax error : missing ';' before 'type' src\mesa\main\uniforms.c(294) : error C2065: 'shProg' : undeclared identifier src\mesa\main\uniforms.c(294) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int' src\mesa\main\uniforms.c(294) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2 src\mesa\main\uniforms.c(306) : error C2143: syntax error : missing ';' before 'type' src\mesa\main\uniforms.c(309) : error C2065: 'shProg' : undeclared identifier src\mesa\main\uniforms.c(309) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int' src\mesa\main\uniforms.c(309) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2 src\mesa\main\uniforms.c(322) : error C2143: syntax error : missing ';' before 'type' src\mesa\main\uniforms.c(325) : error C2065: 'shProg' : undeclared identifier src\mesa\main\uniforms.c(325) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int' src\mesa\main\uniforms.c(325) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2 src\mesa\main\uniforms.c(345) : error C2143: syntax error : missing ';' before 'type' src\mesa\main\uniforms.c(348) : error C2065: 'shProg' : undeclared identifier src\mesa\main\uniforms.c(348) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int' src\mesa\main\uniforms.c(348) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2 src\mesa\main\uniforms.c(360) : error C2143: syntax error : missing ';' before 'type' src\mesa\main\uniforms.c(363) : error C2065: 'shProg' : undeclared identifier src\mesa\main\uniforms.c(363) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int' src\mesa\main\uniforms.c(363) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2 src\mesa\main\uniforms.c(376) : error C2143: syntax error : missing ';' before 'type' src\mesa\main\uniforms.c(379) : error C2065: 'shProg' : undeclared identifier src\mesa\main\uniforms.c(379) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int' src\mesa\main\uniforms.c(379) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2 src\mesa\main\uniforms.c(588) : error C2143: syntax error : missing ';' before 'type' src\mesa\main\uniforms.c(591) : error C2065: 'shProg' : undeclared identifier src\mesa\main\uniforms.c(591) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int' src\mesa\main\uniforms.c(591) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2 src\mesa\main\uniforms.c(603) : error C2143: syntax error : missing ';' before 'type' src\mesa\main\uniforms.c(606) : error C2065: 'shProg' : undeclared identifier src\mesa\main\uniforms.c(606) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int' src\mesa\main\uniforms.c(606) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2 src\mesa\main\uniforms.c(619) : error C2143: syntax error : missing ';' before 'type' src\mesa\main\uniforms.c(622) : error C2065: 'shProg' : undeclared identifier src\mesa\main\uniforms.c(622) : warning C4047: 'function' : 'gl_shader_program *' differs in levels of indirection from 'int' src\mesa\main\uniforms.c(622) : warning C4024: '_mesa_uniform' : different types for formal and actual parameter 2 Signed-off-by: Vinson Lee <[email protected]>
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r--src/mesa/main/uniforms.c47
1 files changed, 20 insertions, 27 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 4c123660f59..c25c2df7e02 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -286,11 +286,10 @@ _mesa_ProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
{
GET_CURRENT_CONTEXT(ctx);
GLfloat v[2];
+ struct gl_shader_program *shProg;
v[0] = v0;
v[1] = v1;
- struct gl_shader_program *shProg =
- _mesa_lookup_shader_program_err(ctx, program,
- "glProgramUniform2f");
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform2f");
_mesa_uniform(ctx, shProg, location, 1, v, GL_FLOAT_VEC2);
}
@@ -300,12 +299,11 @@ _mesa_ProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1,
{
GET_CURRENT_CONTEXT(ctx);
GLfloat v[3];
+ struct gl_shader_program *shProg;
v[0] = v0;
v[1] = v1;
v[2] = v2;
- struct gl_shader_program *shProg =
- _mesa_lookup_shader_program_err(ctx, program,
- "glProgramUniform3f");
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform3f");
_mesa_uniform(ctx, shProg, location, 1, v, GL_FLOAT_VEC3);
}
@@ -315,13 +313,12 @@ _mesa_ProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1,
{
GET_CURRENT_CONTEXT(ctx);
GLfloat v[4];
+ struct gl_shader_program *shProg;
v[0] = v0;
v[1] = v1;
v[2] = v2;
v[3] = v3;
- struct gl_shader_program *shProg =
- _mesa_lookup_shader_program_err(ctx, program,
- "glProgramUniform4f");
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform4f");
_mesa_uniform(ctx, shProg, location, 1, v, GL_FLOAT_VEC4);
}
@@ -340,11 +337,10 @@ _mesa_ProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
{
GET_CURRENT_CONTEXT(ctx);
GLint v[2];
+ struct gl_shader_program *shProg;
v[0] = v0;
v[1] = v1;
- struct gl_shader_program *shProg =
- _mesa_lookup_shader_program_err(ctx, program,
- "glProgramUniform2i");
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform2i");
_mesa_uniform(ctx, shProg, location, 1, v, GL_INT_VEC2);
}
@@ -354,12 +350,11 @@ _mesa_ProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1,
{
GET_CURRENT_CONTEXT(ctx);
GLint v[3];
+ struct gl_shader_program *shProg;
v[0] = v0;
v[1] = v1;
v[2] = v2;
- struct gl_shader_program *shProg =
- _mesa_lookup_shader_program_err(ctx, program,
- "glProgramUniform3i");
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform3i");
_mesa_uniform(ctx, shProg, location, 1, v, GL_INT_VEC3);
}
@@ -369,13 +364,12 @@ _mesa_ProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1,
{
GET_CURRENT_CONTEXT(ctx);
GLint v[4];
+ struct gl_shader_program *shProg;
v[0] = v0;
v[1] = v1;
v[2] = v2;
v[3] = v3;
- struct gl_shader_program *shProg =
- _mesa_lookup_shader_program_err(ctx, program,
- "glProgramUniform4i");
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform4i");
_mesa_uniform(ctx, shProg, location, 1, v, GL_INT_VEC4);
}
@@ -583,11 +577,11 @@ _mesa_ProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
{
GET_CURRENT_CONTEXT(ctx);
GLuint v[2];
+ struct gl_shader_program *shProg;
v[0] = v0;
v[1] = v1;
- struct gl_shader_program *shProg =
- _mesa_lookup_shader_program_err(ctx, program,
- "glProgramUniform2ui");
+ shProg = _mesa_lookup_shader_program_err(ctx, program,
+ "glProgramUniform2ui");
_mesa_uniform(ctx, shProg, location, 1, v, GL_UNSIGNED_INT_VEC2);
}
@@ -597,12 +591,12 @@ _mesa_ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1,
{
GET_CURRENT_CONTEXT(ctx);
GLuint v[3];
+ struct gl_shader_program *shProg;
v[0] = v0;
v[1] = v1;
v[2] = v2;
- struct gl_shader_program *shProg =
- _mesa_lookup_shader_program_err(ctx, program,
- "glProgramUniform3ui");
+ shProg = _mesa_lookup_shader_program_err(ctx, program,
+ "glProgramUniform3ui");
_mesa_uniform(ctx, shProg, location, 1, v, GL_UNSIGNED_INT_VEC3);
}
@@ -612,13 +606,12 @@ _mesa_ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1,
{
GET_CURRENT_CONTEXT(ctx);
GLuint v[4];
+ struct gl_shader_program *shProg;
v[0] = v0;
v[1] = v1;
v[2] = v2;
v[3] = v3;
- struct gl_shader_program *shProg =
- _mesa_lookup_shader_program_err(ctx, program,
- "glProgramUniform4ui");
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramUniform4ui");
_mesa_uniform(ctx, shProg, location, 1, v, GL_UNSIGNED_INT_VEC4);
}