[915] Don't attempt our accelerated drawpixels if no color buffer is attached.
authorEric Anholt <eric@anholt.net>
Fri, 15 Feb 2008 21:42:37 +0000 (13:42 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 15 Feb 2008 21:43:29 +0000 (13:43 -0800)
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

index d7561e70387e49be7815cd902108beaff9d3146c..2804c8deeaf6faab6a7037a419091f6ba0959228 100644 (file)
@@ -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)) {