~paelzer/ubuntu/+source/mesa:suggest-ignoring-signal-seccomp-crash-affinity

Last commit made on 2019-03-07
Get this branch:
git clone -b suggest-ignoring-signal-seccomp-crash-affinity https://git.launchpad.net/~paelzer/ubuntu/+source/mesa
Only Christian Ehrhardt  can upload to this branch. If you are Christian Ehrhardt  please log in for upload directions.

Branch merges

Branch information

Name:
suggest-ignoring-signal-seccomp-crash-affinity
Repository:
lp:~paelzer/ubuntu/+source/mesa

Recent commits

251aa5b... by Christian Ehrhardt 

util/u_queue: handle SISGSYS on pthread_setaffinity_np

If running in a seccomp sandbox the pthread_setaffinity_np call might
fail and the default action of SISGSYS is to crash dump the
application.

While setting the affinity is preferred, it is only an optimization
and should not abort the program if it triggers the seccomp filter.

Signed-off-by: Christian Ehrhardt <email address hidden>

8b010f3... by =?utf-8?q?Tapani_P=C3=A4lli?= <email address hidden>

nir: free dead_ctx in case of no progress

Fixes a leak:

  ==7576== 320 (48 direct, 272 indirect) bytes in 1 blocks are definitely lost in loss record 26 of 26
  ==7576== at 0x4C2EE3B: malloc (vg_replace_malloc.c:309)
  ==7576== by 0x53EF0E4: ralloc_size (ralloc.c:119)
  ==7576== by 0x53EF0C2: ralloc_context (ralloc.c:113)
  ==7576== by 0x5471F64: nir_split_per_member_structs (nir_split_per_member_structs.c:176)
  ==7576== by 0x51288CF: anv_shader_compile_to_nir (anv_pipeline.c:216)

Signed-off-by: Tapani Pälli <email address hidden>
Reviewed-by: Lionel Landwerlin <email address hidden>
Reviewed-by: Eric Engestrom <email address hidden>

4900c0c... by =?utf-8?q?Tapani_P=C3=A4lli?= <email address hidden>

anv: call blob_finish when done with it

Fixes leaks from anv_device_upload_nir:

  ==7345== 8,192 bytes in 2 blocks are definitely lost in loss record 24 of 24
  ==7345== at 0x4C2ED78: malloc (vg_replace_malloc.c:308)
  ==7345== by 0x4C31393: realloc (vg_replace_malloc.c:836)
  ==7345== by 0x54E0848: grow_to_fit (blob.c:67)
  ==7345== by 0x54E0BE5: blob_reserve_bytes (blob.c:166)
  ==7345== by 0x54E0C7C: blob_reserve_intptr (blob.c:186)
  ==7345== by 0x54704A7: nir_serialize (nir_serialize.c:1091)
  ==7345== by 0x512F97D: anv_device_upload_nir (anv_pipeline_cache.c:756)

Signed-off-by: Tapani Pälli <email address hidden>
Reviewed-by: Lionel Landwerlin <email address hidden>
Reviewed-by: Eric Engestrom <email address hidden>

a9555f3... by =?utf-8?q?Tapani_P=C3=A4lli?= <email address hidden>

anv: use anv_gem_munmap in block pool cleanup

Use anv_gem_munmap for unmap when softpin in use, this corresponds to
anv_gem_mmap used in anv_block_pool_expand_range. This fixes valgrind
errors seen for each pool when softpin is in use:

  ==25581== 262,144 bytes in 1 blocks are definitely lost in loss record 31 of 31
  ==25581== at 0x50E77E8: anv_gem_mmap (anv_gem.c:96)
  ==25581== by 0x50EEE2B: anv_block_pool_expand_range (anv_allocator.c:543)
  ==25581== by 0x50EEB51: anv_block_pool_init (anv_allocator.c:477)
  ==25581== by 0x50EF7EF: anv_state_pool_init (anv_allocator.c:920)
  ==25581== by 0x510B8EB: anv_CreateDevice (anv_device.c:2031)

Signed-off-by: Tapani Pälli <email address hidden>
Reviewed-by: Lionel Landwerlin <email address hidden>

744b8e1... by Kenneth Graunke <email address hidden>

iris: Fix MOCS for blits and clears

I915_MOCS_CACHED is the wrong value. Expose mocs() and use that.

ecceb07... by Timothy Arceri <email address hidden>

st/glsl: start spilling out common st glsl conversion code

The NIR and TGSI paths are currently intertwined which makes it
not only hard to follow but also makes it hard to take advantage
of the differences in IR.

Here we take the first step to splitting that path apart. With
this we take the opportunity to no longer call the GLSL IR
optimisation passes after the final lowering calls for NIR. We
can instead just use the NIR passes which can produce better code
and should also result in faster compile times.

The speed-up can be measured in some dolphin uber shaders due to
no longer calling lower_if_to_cond_assign() for example
dolphin/ubershaders/120.shader_test goes from ~1.63 -> ~1.53
seconds on my machine.

There are some code changes as a result of not calling
lower_if_to_cond_assign(), this is because it flattens ifs that
contain UBOs where as NIR's peephole select doesn't. This is
were most of the regressions in Max Waves happens with shader-db.

shader-db results (VEGA):

Totals from affected shaders:
SGPRS: 2349056 -> 2349640 (0.02 %)
VGPRS: 1322160 -> 1323300 (0.09 %)
Spilled SGPRs: 21190 -> 21527 (1.59 %)
Spilled VGPRs: 99 -> 99 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 72 -> 72 (0.00 %) dwords per thread
Code Size: 57260904 -> 57270932 (0.02 %) bytes
Compile Time: 1107186 -> 1022942 (-7.61 %) milliseconds
LDS: 786 -> 786 (0.00 %) blocks
Max Waves: 391932 -> 391619 (-0.08 %)
Wait states: 0 -> 0 (0.00 %)

Reviewed-by: Eric Anholt <email address hidden>

e2fd96a... by Timothy Arceri <email address hidden>

radeonsi/nir: stop calling nir_lower_returns()

We now call this for all drivers in glsl_to_nir() instead.

Reviewed-by: Eric Anholt <email address hidden>

673f4f6... by Timothy Arceri <email address hidden>

i965: stop calling nir_lower_returns()

We now call this for all drivers in glsl_to_nir() instead.

Reviewed-by: Eric Anholt <email address hidden>

7e60d5a... by Timothy Arceri <email address hidden>

glsl: use NIR function inlining for drivers that use glsl_to_nir()

glsl_to_nir() is still missing support for converting certain
functions to NIR, so for those we use the GLSL IR optimisations
to remove the functions.

Reviewed-by: Eric Anholt <email address hidden>

7530d4a... by Timothy Arceri <email address hidden>

glsl/freedreno/panfrost: pass gl_context to the standalone compiler

This allows us to use the ctx with glsl_to_nir() in a following
patch.

Reviewed-by: Eric Anholt <email address hidden>