summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-02-15 13:42:37 -0800
committerEric Anholt <eric@anholt.net>2008-02-15 13:43:29 -0800
commiteed5e6f40f1728ae5ae346d44ce45ba767bbf24c (patch)
tree0dbeda5c3986df8a2b66a98b7a6688467e10523d /src
parent19420e6c2592e8a31e2ead4bccebc1a9ccca52b1 (diff)
[915] Don't attempt our accelerated drawpixels if no color buffer is attached.
Otherwise, glDrawBuffer(GL_NONE); glDrawPixels() results in a segfault when we try to emit the color buffer state during setup.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_draw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
index d7561e7038..2804c8deea 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
@@ -64,12 +64,13 @@ do_texture_drawpixels(GLcontext * ctx,
fprintf(stderr, "%s\n", __FUNCTION__);
intelFlush(&intel->ctx);
- intel->vtbl.render_start(intel);
- intel->vtbl.emit_state(intel);
if (!dst)
return GL_FALSE;
+ intel->vtbl.render_start(intel);
+ intel->vtbl.emit_state(intel);
+
if (src) {
if (!_mesa_validate_pbo_access(2, unpack, width, height, 1,
format, type, pixels)) {