From: Anuj Phogat Date: Fri, 6 Jan 2012 20:48:45 +0000 (-0800) Subject: Enable is_front_buffer_rendering variable in case of GL_FRONT_AND_BACK X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c979fe3e200f42ff1fad75ebdbebe69da27e1aaa;p=mesa.git Enable is_front_buffer_rendering variable in case of GL_FRONT_AND_BACK glDrawBuffer(GL_FRONT_AND_BACK) results in to segmentation fault if intel->is_front_buffer_rendering is not enabled with GL_FRONT_AND_BACK. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44153 Reported-by: Yi Sun Signed-off-by: Anuj Phogat Reviewed-by: Eric Anholt --- diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c index 4632751935a..9809f79bbee 100644 --- a/src/mesa/drivers/dri/intel/intel_buffers.c +++ b/src/mesa/drivers/dri/intel/intel_buffers.c @@ -88,7 +88,7 @@ intelDrawBuffer(struct gl_context * ctx, GLenum mode) intel->is_front_buffer_rendering; intel->is_front_buffer_rendering = (mode == GL_FRONT_LEFT) - || (mode == GL_FRONT); + || (mode == GL_FRONT) || (mode == GL_FRONT_AND_BACK); /* If we weren't front-buffer rendering before but we are now, * invalidate our DRI drawable so we'll ask for new buffers