diff options
author | Maciej Cencora <[email protected]> | 2009-07-04 16:52:48 +0200 |
---|---|---|
committer | Maciej Cencora <[email protected]> | 2009-07-13 19:28:12 +0200 |
commit | 70448b9f95b4ca56526458d207a28727f71e8d3c (patch) | |
tree | 4c9c261f6d74cb97fbb615c8c3ef8df0ce101193 | |
parent | 12a6d73c7590c37ec8ae3f2c8c737791e4461d77 (diff) |
r300: operate on copy of a program when pairing instructions
We need to keep unpaired program for vertex program NQSSADCE.
-rw-r--r-- | src/mesa/drivers/dri/r300/radeon_program_pair.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_program_pair.c b/src/mesa/drivers/dri/r300/radeon_program_pair.c index 906d36e5226..d6fb474cf23 100644 --- a/src/mesa/drivers/dri/r300/radeon_program_pair.c +++ b/src/mesa/drivers/dri/r300/radeon_program_pair.c @@ -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; } |