[Mesa-dev] Android: apps crashed on Intel Gen9 GPU

Chih-Wei Huang cwhuang at android-x86.org
Sat May 14 17:48:34 UTC 2016


2016-05-13 15:30 GMT+08:00 Pohjolainen, Topi <topi.pohjolainen at intel.com>:
> On Thu, May 12, 2016 at 12:25:25AM +0800, Chih-Wei Huang wrote:
>> Testing android-x86 with mesa 11.2.2,
>> I found the Google Play crashed forever on
>> a device with Intel Gen9 GPU (e.g., Skylake).
>>
>> After analyzing, the i965 driver seems to assume
>> irb->mt is not null. For example in
>> brw_meta_fast_clear of brw_meta_fast_clear.c:
>>
>>       struct intel_renderbuffer *irb = intel_renderbuffer(rb);
>>       ...
>>       if (brw->gen >= 9 &&
>>           brw_format_for_mesa_format(irb->mt->format) !=
>>                                                     ^^^^^^^^^ => crashing
>>           brw->render_target_format[irb->mt->format])
>>          clear_type = REP_CLEAR;
>>
>> If I added null checking to irb->mt, it fixes this crashing.
>> However, the app still crashed at other place that
>> accesses irb->mt similarly.
>> (brw_draw.c line 399, gen8_surface_state.c line 432, etc)
>>
>> Please comment how to fix it correctly.
>> Why irb->mt is null but the code assumes it's not?
>
> As far as I understand something has gone wrong before - having an
> intel_renderbuffer without a miptree shouldn't be a reachable state at all.

Thank you for the reply.
When/where should the miptree be set?
How can I debug it?


-- 
Chih-Wei
Android-x86 project
http://www.android-x86.org


More information about the mesa-dev mailing list