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

Ilia Mirkin imirkin at alum.mit.edu
Fri Mar 31 16:53:47 UTC 2017


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


More information about the mesa-dev mailing list