prog->NumInstructions * sizeof(struct prog_instruction));
clone->InputsRead = prog->InputsRead;
clone->OutputsWritten = prog->OutputsWritten;
+ memcpy(clone->TexturesUsed, prog->TexturesUsed, sizeof(prog->TexturesUsed));
+
if (prog->Parameters)
clone->Parameters = _mesa_clone_parameter_list(prog->Parameters);
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;
clone->NumNativeParameters = prog->NumNativeParameters;
clone->NumNativeAttributes = prog->NumNativeAttributes;
clone->NumNativeAddressRegs = prog->NumNativeAddressRegs;
+ clone->NumAluInstructions = prog->NumAluInstructions;
+ clone->NumTexInstructions = prog->NumTexInstructions;
+ clone->NumTexIndirections = prog->NumTexIndirections;
+ clone->NumNativeAluInstructions = prog->NumNativeAluInstructions;
+ clone->NumNativeTexInstructions = prog->NumNativeTexInstructions;
+ clone->NumNativeTexIndirections = prog->NumNativeTexIndirections;
switch (prog->Target) {
case GL_VERTEX_PROGRAM_ARB:
const struct gl_fragment_program *fp
= (const struct gl_fragment_program *) prog;
struct gl_fragment_program *fpc = (struct gl_fragment_program *) clone;
- memcpy(fpc->TexturesUsed, fp->TexturesUsed, sizeof(fp->TexturesUsed));
- fpc->NumAluInstructions = fp->NumAluInstructions;
- fpc->NumTexInstructions = fp->NumTexInstructions;
- fpc->NumTexIndirections = fp->NumTexIndirections;
- fpc->NumNativeAluInstructions = fp->NumNativeAluInstructions;
- fpc->NumNativeTexInstructions = fp->NumNativeTexInstructions;
- fpc->NumNativeTexIndirections = fp->NumNativeTexIndirections;
fpc->FogOption = fp->FogOption;
fpc->UsesKill = fp->UsesKill;
}