diff options
author | Brian Paul <[email protected]> | 2009-01-06 09:20:55 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-01-06 09:20:55 -0700 |
commit | 8e0b601e311ec2f9f8e6205e6a2e6a7642009a96 (patch) | |
tree | f05d741736d7d001166d15b234dd0b6fffc64b45 /src/mesa/shader/prog_parameter.c | |
parent | 7bfe6a9375b413d92982e065fb48c810d144c632 (diff) |
mesa: fix another "out of samplers" problem
Now only the samplers that are actually used by texture() functions are
saved in the uniform variable list. Before, we could run out of samplers
if too many were declared while only some of them were actually used.
(cherry picked from commit 1fad6ccb756ae33ca3115f59c99ca8abbeb0321e)
Conflicts:
src/mesa/shader/slang/slang_link.c
Diffstat (limited to 'src/mesa/shader/prog_parameter.c')
-rw-r--r-- | src/mesa/shader/prog_parameter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index e6653157d46..8ae961241f6 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -290,7 +290,8 @@ _mesa_use_uniform(struct gl_program_parameter_list *paramList, GLuint i; for (i = 0; i < paramList->NumParameters; i++) { struct gl_program_parameter *p = paramList->Parameters + i; - if (p->Type == PROGRAM_UNIFORM && _mesa_strcmp(p->Name, name) == 0) { + if ((p->Type == PROGRAM_UNIFORM || p->Type == PROGRAM_SAMPLER) && + _mesa_strcmp(p->Name, name) == 0) { p->Used = GL_TRUE; /* Note that large uniforms may occupy several slots so we're * not done searching yet. |