[Mesa-dev] Status of radeonsi NIR

Benedikt Schemmer ben at besd.de
Wed Apr 4 11:51:37 UTC 2018


Hi Timothy,

thanks for looking into this.

Dead Island still crashes for me with NIR.

However when I attach apitrace it behaves even more strangely, both TGSI
and NIR crash. TGSI gets a little further. Without apitrace I can play
the game with TGSI and it reproducibly crashes during shader compilation
(Loading Resort screen) with NIR.

Dont spend too much time on this though I think it might be related to
changes in mesa itself (memory leaks?) not necessarily NIR.

I used
apitrace trace --output=/home/nano/deadbeaf5  %command%
in the launch options of steam, otherwise I dont even get this far or
apitrace disattaches itself from the process and no trace is output

tails
==> nircrash <==
186658 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0,
yoffset = 0, width = 1280, height = 720, format = GL_RED, type =
GL_UNSIGNED_BYTE, pixels = blob(921600))
186659 glGenerateMipmap(target = GL_TEXTURE_2D)
186660 glXMakeCurrent(dpy = 0xcb62580, drawable = 0, ctx = NULL) = True
186661 glXMakeCurrent(dpy = 0xcb62580, drawable = 39845908, ctx =
0xce13840) = True
186662 glBindTexture(target = GL_TEXTURE_2D, texture = 129)
186663 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0,
yoffset = 0, width = 640, height = 360, format = GL_RED, type =
GL_UNSIGNED_BYTE, pixels = blob(230400))
186664 glGenerateMipmap(target = GL_TEXTURE_2D)
186665 glXMakeCurrent(dpy = 0xcb62580, drawable = 0, ctx = NULL) = True
186666 glXMakeCurrent(dpy = 0xcb62580, drawable = 39845908, ctx =
0xce13840) = True
186667 glBindTexture(target = GL_TEXTURE_2D, texture = 130)

==> nircrash2 <==
167095 glEnable(cap = GL_FRAMEBUFFER_SRGB)
167096 glClearColor(red = 0, green = 0, blue = 0, alpha = 1)
167097 glClear(mask = GL_COLOR_BUFFER_BIT)
167098 glClearColor(red = 0, green = 0, blue = 0, alpha = 0)
167099 glBindTexture(target = GL_TEXTURE_2D, texture = 128)
167100 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0,
yoffset = 0, width = 1280, height = 720, format = GL_RED, type =
GL_UNSIGNED_BYTE, pixels = blob(921600))
167101 glGenerateMipmap(target = GL_TEXTURE_2D)
167102 glXMakeCurrent(dpy = 0xcc99820, drawable = 0, ctx = NULL) = True
167103 glXMakeCurrent(dpy = 0xcc99820, drawable = 39845908, ctx =
0xcf4bd50) = True
167104 glBindTexture(target = GL_TEXTURE_2D, texture = 129)

==> nircrash3 <==
156903 glEnable(cap = GL_FRAMEBUFFER_SRGB)
156904 glClearColor(red = 0, green = 0, blue = 0, alpha = 1)
156905 glClear(mask = GL_COLOR_BUFFER_BIT)
156906 glClearColor(red = 0, green = 0, blue = 0, alpha = 0)
156907 glBindTexture(target = GL_TEXTURE_2D, texture = 128)
156908 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0,
yoffset = 0, width = 1280, height = 720, format = GL_RED, type =
GL_UNSIGNED_BYTE, pixels = blob(921600))
156909 glGenerateMipmap(target = GL_TEXTURE_2D)
156910 glXMakeCurrent(dpy = 0xc97f820, drawable = 0, ctx = NULL) = True
156911 glXMakeCurrent(dpy = 0xc97f820, drawable = 39845908, ctx =
0xcc57650) = True
156912 glBindTexture(target = GL_TEXTURE_2D, texture = 129)

==> tgsicrash <==
256272 glXMakeCurrent(dpy = 0xc6d26d0, drawable = 39845908, ctx =
0xc974890) = True
256273 glEnable(cap = GL_CULL_FACE)
256274 glFrontFace(mode = GL_CW)
256275 glDepthMask(flag = GL_FALSE)
256276 glXMakeCurrent(dpy = 0xc6d26d0, drawable = 0, ctx = NULL) = True
256277 glXMakeCurrent(dpy = 0xc6d26d0, drawable = 39845908, ctx =
0xc974890) = True
256278 glXMakeCurrent(dpy = 0xc6d26d0, drawable = 0, ctx = NULL) = True
256279 glXMakeCurrent(dpy = 0xc6d26d0, drawable = 39845908, ctx =
0xc974890) = True
256280 glXSwapIntervalMESA(interval = 0) = 0
256281 glXMakeCurrent(dpy = 0xc6d26d0, drawable = 0, ctx = NULL) = True

==> tgsicrash2 <==
294167 glXMakeCurrent(dpy = 0xcbbc820, drawable = 39845908, ctx =
0xce69b30) = True
294168 glEnable(cap = GL_CULL_FACE)
294169 glFrontFace(mode = GL_CW)
294170 glDepthMask(flag = GL_FALSE)
294171 glXMakeCurrent(dpy = 0xcbbc820, drawable = 0, ctx = NULL) = True
294172 glXMakeCurrent(dpy = 0xcbbc820, drawable = 39845908, ctx =
0xce69b30) = True
294173 glXMakeCurrent(dpy = 0xcbbc820, drawable = 0, ctx = NULL) = True
294174 glXMakeCurrent(dpy = 0xcbbc820, drawable = 39845908, ctx =
0xce69b30) = True
294175 glXSwapIntervalMESA(interval = 0) = 0
294176 glXMakeCurrent(dpy = 0xcbbc820, drawable = 0, ctx = NULL) = True



Am 04.04.2018 um 06:05 schrieb Timothy Arceri:
> On 31/03/18 02:44, Benedikt Schemmer wrote:
>> Hi all,
>>
>> I did some more testing with NIR and wanted to share the results.
>> https://github.com/bendat78/mymesa/tree/mymesa2/testresults
>>
>> Overall it seems nir could be better than tgsi, but there are some
>> shaders with significant regressions and I think that introduces
>> framerate drops that are quite noticable in some games (Total War:
>> WARHAMMER benchmark for example).
> 
> I ran the benchmark for this game and there was no real difference
> between the two backends. Can you try again with current master.
> 
>>
>> See the run* directory for comparisons of tgsi vs nir for different
>> versions of llvm and tgsi or nir vs different llvm backends (also
>> includes complete shader db output (around 50k shaders)).
>>
>> NIR gets better with every version increase of llvm, which optimizes for
>> code size (why not speed ?).
>>
>> I found no serious regressions so far, however I think that NIR is
>> responsible for some crashes that happen in Metro 2033 Redux (beginning
>> before actual game) and Dead Island classic (ingame) so probably related
>> to compilation issues.
> 
> I also could not reproduce either of these. If you are still having
> these problems can you create and apitrace [1]?
> 
> Thanks for testing.
> 
> [1] https://github.com/apitrace/apitrace/wiki/Steam
> 
>>
>> Cheers,
>> Benedikt
>>


More information about the mesa-dev mailing list