[Mesa-dev] [PATCH 00/15] GLSL memory allocation rework for faster compilation

Tapani Pälli tapani.palli at intel.com
Mon Oct 10 11:25:12 UTC 2016



On 10/10/2016 01:38 PM, Marek Olšák wrote:
> On Mon, Oct 10, 2016 at 12:33 PM, Marek Olšák <maraeo at gmail.com> wrote:
>> On Mon, Oct 10, 2016 at 7:58 AM, Tapani Pälli <tapani.palli at intel.com> wrote:
>>>
>>>
>>> On 10/08/2016 06:58 PM, Jason Ekstrand wrote:
>>>>
>>>> FYI, we use ralloc for a lot more than just the glsl compiler so the
>>>> first few changes make me a bit nervous.  There was someone working on
>>>> making our driver more I undefined-memory-friendly but I don't know what
>>>> happened to those patches.
>>>
>>>
>>> There's bunch of patches like that in this series:
>>> https://lists.freedesktop.org/archives/mesa-dev/2016-June/120445.html
>>>
>>> it looks like it just never landed as would have required more testing on
>>> misc drivers?
>>
>> We can land at least some of the patches from that series. We still
>> have to replace all non-GLSL uses of DECLARE_RALLOC.. with
>> DECLARE_RZALLOC.
>
> BTW, people can still give Rbs on all patches except 5. This rzalloc
> thing isn't an issue and can be dealt with in a separate series (it
> can be done after this series lands).

I agree these issues do not block review of the series. We just need to 
make sure it is absolutely safe before landing.

As concrete example I got following segfault when I applied this series 
which is directly related to rzalloc issues. This was with 
'shader_freeze' program, description in bug #94477 has link and build 
instructions for this if you want to try. When I applied JP's patches 
4,5,6 (nir, i965_vec4, i965_fs changes) this segfault disappears.

Please JP (CC) rebase and resend those patches!

--- 8< ---

#0  0x00007ffff67366f5 in raise () from /lib64/libc.so.6
#1  0x00007ffff67382fa in abort () from /lib64/libc.so.6
#2  0x00007ffff6777670 in __libc_message () from /lib64/libc.so.6
#3  0x00007ffff6783849 in realloc () from /lib64/libc.so.6
#4  0x00007ffff0c83741 in resize (ptr=0x7ffff1208490 <vtable for 
ir_assignment+16>, size=<optimized out>) at ralloc.c:161
#5  0x00007ffff0c839e3 in reralloc_size (ctx=ctx at entry=0x11d8298, 
ptr=<optimized out>, size=<optimized out>) at ralloc.c:192
#6  0x00007ffff0c83a72 in reralloc_array_size (ctx=ctx at entry=0x11d8298, 
ptr=<optimized out>, size=size at entry=4, count=<optimized out>) at 
ralloc.c:219
#7  0x00007ffff0ccdcf9 in init_liveness_block (state=0x7fffffffafa0, 
block=0x11d8298) at nir/nir_liveness.c:76
#8  nir_live_ssa_defs_impl (impl=impl at entry=0x11d81a8) at 
nir/nir_liveness.c:180
#9  0x00007ffff0d02e18 in nir_metadata_require 
(impl=impl at entry=0x11d81a8, 
required=required at entry=(nir_metadata_dominance | 
nir_metadata_live_ssa_defs)) at nir/nir_metadata.c:43
#10 0x00007ffff0ccc191 in nir_convert_from_ssa_impl (impl=0x11d81a8, 
phi_webs_only=phi_webs_only at entry=true) at nir/nir_from_ssa.c:778
#11 0x00007ffff0ccc610 in nir_convert_from_ssa 
(shader=shader at entry=0x11d7f08, phi_webs_only=phi_webs_only at entry=true) 
at nir/nir_from_ssa.c:810
#12 0x00007ffff0e35d8d in brw_postprocess_nir (nir=nir at entry=0x11d7f08, 
devinfo=0x6566ec, is_scalar=is_scalar at entry=true) at brw_nir.c:538



// Tapani


More information about the mesa-dev mailing list