From: Eric Anholt Date: Fri, 15 Feb 2008 21:42:37 +0000 (-0800) Subject: [915] Don't attempt our accelerated drawpixels if no color buffer is attached. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eed5e6f40f1728ae5ae346d44ce45ba767bbf24c;p=mesa.git [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. --- diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c index d7561e70387..2804c8deeaf 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)) {