Bug 107667

Summary: [regression, bisected] 2.5% performance drop in Middle Earth: Shadow of Mordor
Product: Mesa Reporter: Gregor Münch <gr.muench>
Component: OtherAssignee: mesa-dev
Status: RESOLVED NOTABUG QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: eric, t_arceri
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Gregor Münch 2018-08-23 21:35:43 UTC
I see a small drop of performance with current git in Shadow of Mordor using R600_DEBUG=nir,sisched (faster option over stock).

Shadow of Mordor internal benchmark:
before: 74.7fps
after:  72.9fps
current git: 73.2fps
current git with patch reverted: 74.9fps

Above numbers are from the second run, where the shader cache is warm. The numbers of the first run with cold cache are a lot more random even though for some reason the fps is higher (usually between 75.2 and 76.3 fps). Thats even more strange as the game with cold cache has short hangs when explosions appear. 

There is also a random freeze during the benchmark run hard hanging my machine. I dont know if the bisected patch is the cause of that but it is happening a lot now with current git. In my testing I didnt encounter the problem before the patch. Still could be just noise. I still dont know how to reproduce. If anyone wants to see dmesg:
https://bugs.freedesktop.org/show_bug.cgi?id=107367#c9

glxinfo -B:

  Vendor: X.Org (0x1002)
    Device: AMD Radeon HD 7900 Series (TAHITI, DRM 3.27.0, 4.18.0-2-amd-staging-drm-next-git, LLVM 8.0.0) (0x6798)
    Version: 18.2.0
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 4.4
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1

git bisect bad:

dbd52585fa9fe79aabea3560cb3aaefffe544af9 is the first bad commit
commit dbd52585fa9fe79aabea3560cb3aaefffe544af9
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Jun 20 13:26:52 2018 -0700

    st/nir: Disable varying packing when doing transform feedback.
    
    The varying packing would result in st_nir_assign_var_locations() picking
    new driver_locations, despite the pipe_stream_output already being set up
    for the old driver location.  This left the gallium driver with no way to
    work back to what varying was referenced by pipe_stream_output.
    
    Fixes these tests on V3D:
    dEQP-GLES3.functional.transform_feedback.random.separate.points.3
    dEQP-GLES3.functional.transform_feedback.random.separate.points.7
    dEQP-GLES3.functional.transform_feedback.random.separate.points.9
    dEQP-GLES3.functional.transform_feedback.random.separate.triangles.3
    dEQP-GLES3.functional.transform_feedback.random.separate.triangles.8
    
    Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>

:040000 040000 67b42f008c50da7b17a15816ba76aca99e395133 2ac10eeaa23aaacc3986d91b27eef4e58375a6a8 M	src
Comment 1 Timothy Arceri 2019-05-07 02:50:39 UTC
This is a correct bugfix. It's likely any gain in performance was due to not doing the correct thing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.