aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_link.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-01-19 10:15:04 +0000
committerKeith Whitwell <[email protected]>2009-01-19 10:15:04 +0000
commitb5db6b039c34117be4e441a2b95abbf97df928c3 (patch)
tree8efb8698304b70f67cc408e8d12b93ae01a13015 /src/mesa/shader/slang/slang_link.c
parent8f3fac6107460b6d9b011b5c76246468bb16004b (diff)
parent76753e30781e88912c0465642616ab16bbc1b4f3 (diff)
Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
Diffstat (limited to 'src/mesa/shader/slang/slang_link.c')
-rw-r--r--src/mesa/shader/slang/slang_link.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index a68cafc0865..b5862bda822 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -260,8 +260,8 @@ link_uniform_vars(GLcontext *ctx,
GLuint newSampNum = *numSamplers;
if (newSampNum >= ctx->Const.MaxTextureImageUnits) {
char s[100];
- sprintf(s, "Too many texture samplers (%u, max is %u)",
- newSampNum, ctx->Const.MaxTextureImageUnits);
+ _mesa_sprintf(s, "Too many texture samplers (%u, max is %u)",
+ newSampNum, ctx->Const.MaxTextureImageUnits);
link_error(shProg, s);
return GL_FALSE;
}
@@ -282,12 +282,14 @@ link_uniform_vars(GLcontext *ctx,
for (i = 0; i < prog->NumInstructions; i++) {
struct prog_instruction *inst = prog->Instructions + i;
if (_mesa_is_tex_instruction(inst->Opcode)) {
- /*
+ const GLint oldSampNum = inst->TexSrcUnit;
+
+#if 0
printf("====== remap sampler from %d to %d\n",
- inst->Sampler, map[ inst->Sampler ]);
- */
+ inst->TexSrcUnit, samplerMap[ inst->TexSrcUnit ]);
+#endif
+
/* here, texUnit is really samplerUnit */
- const GLint oldSampNum = inst->TexSrcUnit;
if (oldSampNum < Elements(samplerMap)) {
const GLuint newSampNum = samplerMap[oldSampNum];
inst->TexSrcUnit = newSampNum;