summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-01-09 17:49:24 -0700
committerBrian <[email protected]>2007-01-09 17:49:24 -0700
commit3209c3ed0d82c158eed1020759aacf51ba1c1ad5 (patch)
treea2dad53d32547ef01b36fd9296dc4f68e52292f8 /src/mesa/shader/program.c
parent5e75db12d7b17f0295e8099bd357220df97d5013 (diff)
Implement vertex attribute binding.
Users can set explicit binding with glBindAttribLocation(), otherwise the linker will allocate generic attribute slots.
Diffstat (limited to 'src/mesa/shader/program.c')
-rw-r--r--src/mesa/shader/program.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 1b26b6c9321..7a319496730 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -365,6 +365,8 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog)
memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams));
if (prog->Varying)
clone->Varying = _mesa_clone_parameter_list(prog->Varying);
+ if (prog->Attributes)
+ clone->Attributes = _mesa_clone_parameter_list(prog->Attributes);
memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams));
clone->NumInstructions = prog->NumInstructions;
clone->NumTemporaries = prog->NumTemporaries;