[Mesa-dev] [PATCH v3 00/13] TGSI: improved live range tracking, also including arrays

Benedikt Schemmer ben at besd.de
Sat Apr 28 22:06:27 UTC 2018


Hi Gert

Am 28.04.2018 um 23:51 schrieb Gert Wollny:
> Am Samstag, den 28.04.2018, 22:43 +0200 schrieb Benedikt Schemmer:
>> The patches apply cleanly, however I just did a shader-db test run
>> and can't find a difference with your patch
>> applied, am I doing something wrong?
> 
> AFAIK radeonsi doesn't use the register-merge optimizer in TGSI.
> 

Ah, ok. Was wondering why your debug code doesn't output anything.
Makes sense now ;)

So is this useless on radeonsi?
Seemed interesting to me.

>>
>> compile times went up though:
> This is strange, because "see above". Did you compile with debug
> information and c++11 or higher enables? In this case there is one
> access to a static variable (first patch)  that per c++11 standard
> should be thread save, which means that there might be a mutex
> protecting access to that variable, and this would explain the longer
> runtime in a multi-threaded environment.  
> 

not intentionally:

       prefix:          /usr/local
        exec_prefix:     ${prefix}
        libdir:          ${prefix}/lib
        includedir:      ${prefix}/include

        OpenGL:          yes (ES1: yes ES2: yes)

        OSMesa:          libOSMesa

        DRI platform:    drm
        DRI drivers:     i915 i965 nouveau r200 radeon swrast
        DRI driver dir:  ${prefix}/lib/dri
        GLX:             DRI-based

        EGL:             yes
        EGL drivers:     builtin:egl_dri2 builtin:egl_dri3
        GBM:             yes
        EGL/Vulkan/VL platforms:   x11 wayland drm

        Vulkan drivers:  intel radeon
        Vulkan ICD dir:  ${datarootdir}/vulkan/icd.d

        llvm:            yes
        llvm-config:     llvm-config-6.0
        llvm-version:    6.0.0

        Gallium drivers: nouveau svga r600 r300 i915 virgl radeonsi swrast
        Gallium st:      mesa xa xvmc vdpau omx_bellagio va nine clover

        HUD extra stats: yes
        HUD lmsensors:   yes


        Shared libs:     yes
        Static libs:     no
        Shared-glapi:    yes

        CFLAGS:          -O3 -fstack-protector-strong -Wall -Wextra -Werror=format-security -fno-omit-frame-pointer -Wall -Werror=implicit-function-declaration -Werror=missing-prototypes
-Wmissing-prototypes -fno-math-errno -fno-trapping-math -std=c99
        CXXFLAGS:        -O3 -fstack-protector-strong -Wall -Wextra -Werror=format-security -fno-omit-frame-pointer -Wall -fno-math-errno -fno-trapping-math
        CXX11_CXXFLAGS:
        LDFLAGS:         -Bsymbolic-functions -z relro
        Macros:          -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM
-DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_STRTOD_L -DHAVE_DL_ITERATE_PHDR -DHAVE_POSIX_MEMALIGN -DHAVE_ZLIB -DHAVE_LINUX_FUTEX_H -DHAVE_GALLIUM_EXTRA_HUD=1
-DHAVE_LIBSENSORS=1 -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRM_PLATFORM
-DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DENABLE_SHADER_CACHE -DHAVE_MINCORE -DHAVE_ST_VDPAU -DHAVE_LLVM=0x0600 -DMESA_LLVM_VERSION_PATCH=0

        LLVM_CFLAGS:     -I/usr/lib/llvm-6.0/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
        LLVM_CXXFLAGS:   -I/usr/lib/llvm-6.0/include -std=c++0x -std=c++11 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
        LLVM_CPPFLAGS:   -I/usr/lib/llvm-6.0/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
        LLVM_LDFLAGS:    -L/usr/lib/llvm-6.0/lib

        PYTHON2:         python2.7

        Run 'make' to build Mesa

Cheers,
Benedikt


> Best, 
> Gert
> 
>>
>> before:
>> Thread 3 took 113.72 seconds and compiled 17899 shaders (not
>> including SIMD16) with 2232 GL context switches
>> Thread 5 took 113.23 seconds and compiled 17767 shaders (not
>> including SIMD16) with 2150 GL context switches
>> Thread 7 took 116.63 seconds and compiled 18030 shaders (not
>> including SIMD16) with 2219 GL context switches
>> Thread 1 took 117.10 seconds and compiled 17966 shaders (not
>> including SIMD16) with 2154 GL context switches
>> Thread 4 took 113.76 seconds and compiled 18097 shaders (not
>> including SIMD16) with 2285 GL context switches
>> Thread 2 took 113.61 seconds and compiled 17111 shaders (not
>> including SIMD16) with 1934 GL context switches
>> Thread 6 took 118.93 seconds and compiled 17887 shaders (not
>> including SIMD16) with 2205 GL context switches
>> Thread 0 took 112.91 seconds and compiled 18232 shaders (not
>> including SIMD16) with 2321 GL context switches
>>
>> with your patch:
>> Thread 1 took 119.41 seconds and compiled 18495 shaders (not
>> including SIMD16) with 2237 GL context switches
>> Thread 7 took 122.11 seconds and compiled 17228 shaders (not
>> including SIMD16) with 2105 GL context switches
>> Thread 4 took 120.57 seconds and compiled 17989 shaders (not
>> including SIMD16) with 2165 GL context switches
>> Thread 5 took 119.79 seconds and compiled 17709 shaders (not
>> including SIMD16) with 2190 GL context switches
>> Thread 6 took 121.95 seconds and compiled 17804 shaders (not
>> including SIMD16) with 2209 GL context switches
>> Thread 2 took 121.43 seconds and compiled 17819 shaders (not
>> including SIMD16) with 2167 GL context switches
>> Thread 0 took 117.16 seconds and compiled 18180 shaders (not
>> including SIMD16) with 2151 GL context switches
>> Thread 3 took 124.79 seconds and compiled 17765 shaders (not
>> including SIMD16) with 2176 GL context switches
>>
>>
>>
>> Radeon RX 560 Series (POLARIS11, DRM 3.26.0, 4.17.0-rc2+, LLVM 6.0.0)
>>
>> Mesa git of today
>>
>> PERCENTAGE DELTAS    Shaders     SGPRs     VGPRs SpillSGPR
>> SpillVGPR  PrivVGPR   Scratch  CodeSize  MaxWaves     Waits
>>  0ad                        6     .         .         .         .    
>>      .         .         .         .         .
>>  aer                      590     .         .         .         .    
>>      .         .         .         .         .
>>  alien_isolation         1414     .         .         .         .    
>>      .         .         .         .         .
>>  anholt                    10     .         .         .         .    
>>      .         .         .         .         .
>>  bioshock_infinite       2581     .         .         .         .    
>>      .         .         .         .         .
>>  blackmesa                584     .         .         .         .    
>>      .         .         .         .         .
>>  cat                      573     .         .         .         .    
>>      .         .         .         .         .
>>  csgo                    1392     .         .         .         .    
>>      .         .         .         .         .
>>  deadisland_definitive   1776     .         .         .         .    
>>      .         .         .         .         .
>>  deadisland_original    11602     .         .         .         .    
>>      .         .         .         .         .
>>  deadisland_riptide_..    293     .         .         .         .    
>>      .         .         .         .         .
>>  deusex_mankind          5051     .         .         .         .    
>>      .         .         .         .         .
>>  dirtrally                787     .         .         .         .    
>>      .         .         .         .         .
>>  dolphin                   22     .         .         .         .    
>>      .         .         .         .         .
>>  dyinglight              4012     .         .         .         .    
>>      .         .         .         .         .
>>  eurotruck2               216     .         .         .         .    
>>      .         .         .         .         .
>>  f1_2015                  746     .         .         .         .    
>>      .         .         .         .         .
>>  glamor                    16     .         .         .         .    
>>      .         .         .         .         .
>>  hl2ep1                   294     .         .         .         .    
>>      .         .         .         .         .
>>  hl2ep2                   154     .         .         .         .    
>>      .         .         .         .         .
>>  hl2lostcoast              66     .         .         .         .    
>>      .         .         .         .         .
>>  hlsl3                    582     .         .         .         .    
>>      .         .         .         .         .
>>  humus-
>> celshading           4     .         .         .         .         . 
>>         .         .         .         .
>>  humus-
>> domino               6     .         .         .         .         . 
>>         .         .         .         .
>>  humus-
>> dynamicbranching    24     .         .         .         .         . 
>>         .         .         .         .
>>  humus-
>> hdr                 10     .         .         .         .         . 
>>         .         .         .         .
>>  humus-
>> portals              2     .         .         .         .         . 
>>         .         .         .         .
>>  humus-
>> volumetricfog..      6     .         .         .         .         . 
>>         .         .         .         .
>>  kerbal                  1016     .         .         .         .    
>>      .         .         .         .         .
>>  larago                   664     .         .         .         .    
>>      .         .         .         .         .
>>  madmax                   354     .         .         .         .    
>>      .         .         .         .         .
>>  metro2033redux          4410     .         .         .         .    
>>      .         .         .         .         .
>>  nexuiz                    80     .         .         .         .    
>>      .         .         .         .         .
>>  piglit                 80734     .         .         .         .    
>>      .         .         .         .         .
>>  ruiner                   685     .         .         .         .    
>>      .         .         .         .         .
>>  sauerbraten                7     .         .         .         .    
>>      .         .         .         .         .
>>  serioussam2017           736     .         .         .         .    
>>      .         .         .         .         .
>>  soma                     436     .         .         .         .    
>>      .         .         .         .         .
>>  specops                 1814     .         .         .         .    
>>      .         .         .         .         .
>>  stellaris                434     .         .         .         .    
>>      .         .         .         .         .
>>  supertuxkart               4     .         .         .         .    
>>      .         .         .         .         .
>>  talos                    762     .         .         .         .    
>>      .         .         .         .         .
>>  tesseract                430     .         .         .         .    
>>      .         .         .         .         .
>>  tombraider              1012     .         .         .         .    
>>      .         .         .         .         .
>>  total_war_shogun_2       176     .         .         .         .    
>>      .         .         .         .         .
>>  total_war_warhammer      218     .         .         .         .    
>>      .         .         .         .         .
>>  ubershaders               54     .         .         .         .    
>>      .         .         .         .         .
>>  ug_gettysburg            149     .         .         .         .    
>>      .         .         .         .         .
>>  unigine_heaven           226     .         .         .         .    
>>      .         .         .         .         .
>>  unigine_superposition    733     .         .         .         .    
>>      .         .         .         .         .
>>  unigine_valley           288     .         .         .         .    
>>      .         .         .         .         .
>>  unity                     72     .         .         .         .    
>>      .         .         .         .         .
>>  w40kdawn2                421     .         .         .         .    
>>      .         .         .         .         .
>>  w40kdawn3                164     .         .         .         .    
>>      .         .         .         .         .
>>  warsow                   176     .         .         .         .    
>>      .         .         .         .         .
>>  warzone2100                4     .         .         .         .    
>>      .         .         .         .         .
>>  witcher2                 928     .         .         .         .    
>>      .         .         .         .         .
>>  x3_albion                641     .         .         .         .    
>>      .         .         .         .         .
>>  xblades                  208     .         .         .         .    
>>      .         .         .         .         .
>>  xcom                    1020     .         .         .         .    
>>      .         .         .         .         .
>>  xcom2                   1439     .         .         .         .    
>>      .         .         .         .         .
>>  yofrankie                 82     .         .         .         .    
>>      .         .         .         .         .
>>  ------------------------------------------------------------------
>> ----------------------------------------------------
>>  All
>> affected               0     .         .         .         .         
>> .         .         .         .         .
>>  ------------------------------------------------------------------
>> ----------------------------------------------------
>>  Total                 133396     .         .         .         .    
>>      .         .         .         .         .


More information about the mesa-dev mailing list