diff options
author | Brian <brian@yutani.localnet.net> | 2007-01-05 16:02:45 -0700 |
---|---|---|
committer | Brian <brian@yutani.localnet.net> | 2007-01-05 16:02:45 -0700 |
commit | 5cf7326132a37f11357b5cb31bcc9238fef5b54c (patch) | |
tree | 8d92595241072e8aebba501c68b544ef8b4e13eb /src/mesa/shader/shader_api.c | |
parent | b2ab693d68f2ba1358b9c3f8bab53b9ebfb586fe (diff) | |
download | external_mesa3d-5cf7326132a37f11357b5cb31bcc9238fef5b54c.zip external_mesa3d-5cf7326132a37f11357b5cb31bcc9238fef5b54c.tar.gz external_mesa3d-5cf7326132a37f11357b5cb31bcc9238fef5b54c.tar.bz2 |
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.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index d6dacdd..bd258f8 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); + } } |