summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c10
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 3d094b9db5..e29df87696 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -385,8 +385,18 @@ GLboolean r300_run_vb_render(GLcontext *ctx,
int r300Fallback(GLcontext *ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
+ struct r300_fragment_program *rp =
+ (struct r300_fragment_program *)
+ (char *)ctx->FragmentProgram._Current;
int i;
+ if (rp) {
+ if (!rp->translated)
+ r300_translate_fragment_shader(rp);
+
+ FALLBACK_IF(!rp->translated);
+ }
+
/* We do not do SELECT or FEEDBACK (yet ?)
* Is it worth doing them ?
*/
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index e06999aa26..a12f3bb531 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -1823,7 +1823,7 @@ void r300SetupPixelShader(r300ContextPtr rmesa)
r300_translate_fragment_shader(rp);
if (!rp->translated) {
fprintf(stderr, "%s: No valid fragment shader, exiting\n", __func__);
- exit(-1);
+ return;
}
#define OUTPUT_FIELD(st, reg, field) \