diff options
author | Eric Anholt <[email protected]> | 2008-02-15 13:42:37 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2008-02-15 13:43:29 -0800 |
commit | eed5e6f40f1728ae5ae346d44ce45ba767bbf24c (patch) | |
tree | 0dbeda5c3986df8a2b66a98b7a6688467e10523d | |
parent | 19420e6c2592e8a31e2ead4bccebc1a9ccca52b1 (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.
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_pixel_draw.c | 5 |
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 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)) { |