r300: operate on copy of a program when pairing instructions

We need to keep unpaired program for vertex program NQSSADCE.
This commit is contained in:
Maciej Cencora
2009-07-04 16:52:48 +02:00
parent 12a6d73c75
commit 70448b9f95
@@ -870,7 +870,7 @@ GLboolean radeonPairProgram(GLcontext *ctx, struct gl_program *program,
_mesa_bzero(&s, sizeof(s));
s.Ctx = ctx;
s.Program = program;
s.Program = _mesa_clone_program(ctx, program);
s.Handler = handler;
s.UserData = userdata;
s.Debug = (RADEON_DEBUG & DEBUG_PIXEL) ? GL_TRUE : GL_FALSE;
@@ -904,6 +904,8 @@ GLboolean radeonPairProgram(GLcontext *ctx, struct gl_program *program,
_mesa_free(s.ValuePool);
_mesa_free(s.ReaderPool);
_mesa_reference_program(ctx, &s.Program, NULL);
return !s.Error;
}