diff options
author | Brian Paul <[email protected]> | 2008-05-14 16:09:46 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-05-14 16:09:46 -0600 |
commit | ade508312c701ce89d3c2cd717994dbbabb4f207 (patch) | |
tree | 7c7a35935143d90c99820025a8887c5606041db6 /src/mesa/shader/prog_execute.c | |
parent | c807c1a23fc918591e9d2f6f26c4e071a725bced (diff) |
Updated GLSL uniform/sampler handling from gallium-0.1 branch
Previously, the shader linker combined the uniforms used by the vertex and
fragment shaders into a combined set of uniforms. This made the implementation
of glUniform*() simple, but was rather inefficient otherwise. Now each shader
gets its own set of uniforms (no more modelview matrix showing up in the
fragment shader uniforms, for example).
cherry-picked by hand from gallium-0.1 branch
Diffstat (limited to 'src/mesa/shader/prog_execute.c')
-rw-r--r-- | src/mesa/shader/prog_execute.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index cb17aa501ce..d9bde3fc04f 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -310,6 +310,8 @@ fetch_texel(GLcontext *ctx, const GLfloat texcoord[4], GLfloat lodBias, GLfloat color[4]) { + const GLuint unit = machine->Samplers[inst->TexSrcUnit]; + /* Note: we only have the right derivatives for fragment input attribs. */ if (machine->NumDeriv > 0 && @@ -320,12 +322,10 @@ fetch_texel(GLcontext *ctx, machine->FetchTexelDeriv(ctx, texcoord, machine->DerivX[attr], machine->DerivY[attr], - lodBias, - inst->TexSrcUnit, color); + lodBias, unit, color); } else { - machine->FetchTexelLod(ctx, texcoord, lodBias, - inst->TexSrcUnit, color); + machine->FetchTexelLod(ctx, texcoord, lodBias, unit, color); } } |