From eed5e6f40f1728ae5ae346d44ce45ba767bbf24c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 15 Feb 2008 13:42:37 -0800 Subject: [PATCH] [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. --- src/mesa/drivers/dri/intel/intel_pixel_draw.c | 5 +++-- 1 file 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 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)) { -- 2.30.2