summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-01-05 16:02:45 -0700
committerBrian <[email protected]>2007-01-05 16:02:45 -0700
commit5cf7326132a37f11357b5cb31bcc9238fef5b54c (patch)
tree8d92595241072e8aebba501c68b544ef8b4e13eb /src/mesa/shader/shader_api.c
parentb2ab693d68f2ba1358b9c3f8bab53b9ebfb586fe (diff)
Checkpoint glsl compiler work: sampler uniforms now implemented, linked properly.
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index d6dacdd6793..bd258f8737b 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -741,7 +741,8 @@ _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name)
* We need to handle things like "e.c[0].b" as seen in the
* GLSL orange book, page 189.
*/
- if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) {
+ if ((u->Type == PROGRAM_UNIFORM ||
+ u->Type == PROGRAM_SAMPLER) && !strcmp(u->Name, name)) {
return loc;
}
}
@@ -925,6 +926,12 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count,
return;
}
}
+
+ if (shProg->Uniforms->Parameters[location].Type == PROGRAM_SAMPLER) {
+ _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base);
+ _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base);
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ }
}