[Mesa-dev] Status of radeonsi NIR

Timothy Arceri tarceri at itsqueeze.com
Wed Feb 28 10:53:13 UTC 2018


Hi all,

I thought I'd provide a quick status overview of the radeonsi NIR 
backend. I'll attempt to list all outstanding tasks (that I'm aware of) 
so if you are interested in working on one of those just give me a heads 
up so we don't overlap.

Also feel free to reply with any feedback on performance and regression 
results for games (see below). Although try to avoid games like DoW3 
that make use of bindless textures until the missing support lands.

--------------------------
Test Suites / Conformance:
--------------------------

We are starting to look really good here. I don't have recent CTS 
results bug it was similar low number of regressions.

Piglit results for TGSI on Polaris:

    skip: 1555, pass: 24313, warn: 13, fail: 167, crash: 1

Piglit results for NIR on Polaris:

    skip: 1555, pass: 24252, warn: 15, fail: 215, crash: 12

Summary of these 61 regressions:

arb_texture_multisample texelfetch bug(s)?
    Number of failures: 39
    Cause of failures: Unknown. Probably all the same bug, thus
       far I have been unable to spot the issue. Feel free to
       debug this :P
    Status: Not started
    Tests:
       arb_texture_multisample

Missing bindless texture support
    Number of failures: 7
    Cause of failures: Mostly known
    Status: In progress
    Tests:
       arb_bindless_texture

Bug in sampler lowering
    Number of failures: 1
    Cause of failures:
       nir_lower_samplers_as_deref() only works when
       a struct only contains samplers and is therefor no longer used
       after lowering. If however the struct also contains ordinary
       variables then we need to update its glsl_type after lowering
       to remove the sampler members.
    Status: Not started
    Tests:
       ./bin/shader_runner 
tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test 
-auto -fbo

arb_enhanced_layouts component offsets bugs
    Number of failures: 6
    Cause of failures: Incorrect component offsets
    Status: Not started
    Tests:  arb_enhanced_layouts/execution/component-layout

Missing NIR/NIR->LLVM support for frexp opcode
    Number of failures: 1
    Cause of failures: missing frexp opcode
    Status: Not started
    Tests:
        	./bin/shader_runner 
tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-frexp-dvec4.shader_test 
-auto -fbo

arb_tessellation_shader doubles bugs:
    Number of failures: 3
    Cause of failures: possibly dual slot varying related.
    Status: Not started
    Tests:
       arb_tessellation_shader

Bug with explicit location for doubles
    Number of failures: 1
    Cause of failures: incorrect location offset?
    Status: Not started
    Tests:
       ./bin/shader_runner 
tests/spec/arb_gpu_shader_fp64/execution/explicit-location-gs-fs-vs.shader_test 
-auto -fbo

Shared atomics bug
    Number of failures: 1
    Cause of failures: Unknown
    Status: Not started
    Tests:
       ./bin/shader_runner 
tests/spec/arb_compute_shader/execution/shared-atomics.shader_test -auto 
-fbo

Non optimal variable indexing:
    Number of failures: 1
    Cause of failures: Excessive spilling. Optimisations to the
       nir -> llvm path should resolve the issue (see the missing
       optimisations section below).
    Status: Not started
    Tests:
        	./bin/shader_runner 
tests/spec/glsl-1.50/execution/variable-indexing/gs-input-array-vec3-index-rd.shader_test 
-auto -fbo

gs max input components bug
       Number of failures: 1
    Cause of failures: Possibly related to the issue above.
    Status: Not started
    Tests:
       ./bin/shader_runner 
tests/spec/glsl-1.50/execution/geometry/max-input-components.shader_test 
-auto -fbo


--------------------------
Missing optimisations:
--------------------------

- There are a number of TODOS in si_shader_nir.c that need to be
   finished off.

- Optimal variable indexing (see Non optimal variable indexing in
   the piglit failures above). Need to implement something in nir -> llvm
   like si_llvm_emit_fetch() does for TGSI. This will benefit both
   radeonsi and radv.

- Fast path when user data SGPRs point to constant buffer 0 directly.
   See si_shader.c:fetch_constant()

- Need to double check NIR is not lowering anything we can handle
   natively.

- There are likely more improvements we can do for the NIR shader cache.
   For one we should probably create a driver function so that we can
   call all NIR opts/lowering from the st at link time to avoid variants
   having to call these for a second time.

- Likely a bunch more I've forgotten or missed.

-----------------
Performance:
-----------------

More testing is needed. I haven't done much testing here yet, there were 
some phoronix tests a while back that showed a few regressions in 
performance. However at that stage we didn't yet have any shader cache 
and the large MadMax regression was actually causes by an llvm bug 
(which has been fixed in master 7.0). I'm hopeful any regressions won't 
be too bad at this stage.

-----------------------------
Real world testing (Games):
-----------------------------

Again more testing is needed here. Of the few games I've tested so far 
most seem to run fine.

Known regressions:
- Dead Island (displays only graphics corruptions on start-up)


More information about the mesa-dev mailing list