From 878697855245ffb67b355ab290da5f6759ae891d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Tue, 1 Aug 2017 13:26:51 +0300 Subject: [PATCH] i965: do not attempt fast clear on pbuffer surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoid us crashing within blorp code, crash has been observed with Playstore and 3DMark (which both use webview). See freedesktop.org bug #101925 for more information. backtrace: #00 pc 0000000000725844 /system/lib64/dri/i965_dri.so (get_fast_clear_rect+404) #01 pc 00000000007255d8 /system/lib64/dri/i965_dri.so (blorp_fast_clear+328) #02 pc 00000000000615d6 /system/lib64/dri/i965_dri.so (do_single_blorp_clear+1542) #03 pc 0000000000060fae /system/lib64/dri/i965_dri.so (brw_blorp_clear_color+206) #04 pc 000000000006671e /system/lib64/dri/i965_dri.so (brw_clear+494) #05 pc 0000000000318a32 /system/lib64/dri/i965_dri.so (_mesa_Clear+802) #06 pc 0000000000c7a1bf /system/app/WebViewGoogle/WebViewGoogle.apk (offset 0xa6f000) Signed-off-by: Tapani Pälli --- src/mesa/drivers/dri/i965/brw_blorp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index b2987ca..ad02ac6 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -799,6 +799,10 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb, if (irb->layer_count > 1 || irb->mt_level || irb->mt_layer) can_fast_clear = false; + /* Workaround for pbuffer issues. */ + if (fb->Visual.doubleBufferMode == 0) + can_fast_clear = false; + unsigned level = irb->mt_level; const unsigned num_layers = fb->MaxNumLayers ? irb->layer_count : 1; -- 2.9.4