summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-02-03 17:32:02 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-02-03 17:32:02 +0100
commitcf4ccd5020743591b8d2b29df279c729004ca393 (patch)
tree54abea6b533d50a5f7aec2e5c77914a6e8b652e9 /src
parentbeffa17bb984b29696a99a0c54922ff6a7d0b386 (diff)
Fall back to software rasterization if r300_translate_fragment_shader() fails.
Aborting immediately is a bad idea with AIGLX.
Diffstat (limited to 'src')
-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) \