summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-10-22 17:38:32 +0200
committerNicolai Hähnle <[email protected]>2017-11-09 11:37:51 +0100
commit4f493c79eee01724152b6e56c71b81303e3bc54e (patch)
tree52236d0f1efe12b44ddc444c46a842933343e4ce /src/gallium/state_trackers
parentd1ff0826370cb1cfbcf741c8eb35caf1fddd7d52 (diff)
radeonsi: use ready fences on all shaders, not just optimized ones
There's a race condition between si_shader_select_with_key and si_bind_XX_shader: Thread 1 Thread 2 -------- -------- si_shader_select_with_key begin compiling the first variant (guarded by sel->mutex) si_bind_XX_shader select first_variant by default as state->current si_shader_select_with_key match state->current and early-out Since thread 2 never takes sel->mutex, it may go on rendering without a PM4 for that shader, for example. The solution taken by this patch is to broaden the scope of shader->optimized_ready to a fence shader->ready that applies to all shaders. This does not hurt the fast path (if anything it makes it faster, because we don't explicitly check is_optimized). It will also allow reducing the scope of sel->mutex locks, but this is deferred to a later commit for better bisectability. Fixes dEQP-EGL.functional.sharing.gles2.multithread.simple.buffers.bufferdata_render Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
0 files changed, 0 insertions, 0 deletions