[Mesa-dev] Fwd: [PATCH 1/1] glsl/blob: handle copy of NULL ptr in blob_write_string

gregory hainaut gregory.hainaut at gmail.com
Fri Mar 31 19:05:11 UTC 2017


On Fri, 31 Mar 2017 12:53:47 -0400
Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> On Fri, Mar 31, 2017 at 6:12 AM, Gregory Hainaut
> <gregory.hainaut at gmail.com> wrote:
> >> Others have reported this crashing on Nouveau. I haven't seen the problem on radeonsi or i965.
> >
> > Hello Timothy (sorry for the double mail, email is a complex tool:) )
> >
> > Hum, tbh. I was quite surprised to hit this bug. I guess you save a
> > pre-optimized shader in the cache. So it could depends on optimization
> > passes.
> >
> > From the top of my head, I think the "offending" line is this one
> > const ivec2 offsets[4] = {ivec2(...), ivec2(...), ivec2(...), ivec2(...)};
> >
> > Strangely enough there are only 3 parameters without name in the
> > parameter list (signature is int, size 2 and CONTANT). Maybe one was
> > optimized away, I didn't look further.
> 
> Note that nouveau is unique in that it can process
> textureGatherOffsets() directly, without lowering it to 4x
> textureGatherOffset.
> 
> The relevant code is in st_glsl_to_tgsi.cpp
> 
>       if (!pscreen->get_param(pscreen, PIPE_CAP_TEXTURE_GATHER_OFFSETS))
>          lower_offset_arrays(ir);
> 
> So I think with nouveau, you're seeing glsl ir that you wouldn't see otherwise.
> 
>   -ilia

Hello ilia

You're right. The issue appears in the texture gather 4 opcode.

I can see this path (st_glsl_to_tgsi.cpp) in GDB.
case ir_tg4:
   opcode = TGSI_OPCODE_TG4;


Cheers,
Gregory


More information about the mesa-dev mailing list