summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog.c7
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog_emit.c2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c
index 7cf32acd4e..0483c09ba0 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog.c
@@ -331,20 +331,19 @@ void r500TranslateFragmentShader(r300ContextPtr r300,
radeonCompilerDump(&compiler.compiler);
}
- if (!r500FragmentProgramEmit(&compiler))
- fp->error = GL_TRUE;
+ fp->translated = r500FragmentProgramEmit(&compiler);
radeonCompilerCleanup(&compiler.compiler);
r300UpdateStateParameters(r300->radeon.glCtx, _NEW_PROGRAM);
- fp->translated = GL_TRUE;
if (RADEON_DEBUG & DEBUG_PIXEL) {
fprintf(stderr, "Mesa program:\n");
fprintf(stderr, "-------------\n");
_mesa_print_program(&fp->mesa_program.Base);
fflush(stdout);
- dump_program(&fp->code);
+ if (fp->translated)
+ dump_program(&fp->code);
}
}
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog_emit.c b/src/mesa/drivers/dri/r300/r500_fragprog_emit.c
index 3b515515ef..59c9048653 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog_emit.c
@@ -1296,7 +1296,7 @@ static GLboolean parse_program(struct r500_pfs_compile_state *cs)
fpi = clause->Instructions + ip;
counter = do_inst(cs, fpi, counter);
- if (cs->compiler->fp->error == GL_TRUE)
+ if (cs->compiler->fp->error)
return GL_FALSE;
}
}