r5xx: Detangle FP fallback and translation switches.

r5xx should fallback if it encounters a bad FP.
TODO: Re-enable the dumb shader so we don't have to completely fallback.
This commit is contained in:
Corbin Simpson
2008-06-14 17:51:04 -07:00
parent 43da118961
commit 7413c55d93
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -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);
}
}
@@ -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;
}
}