draw/gs: fix emitting inactive primitives crash
authorDave Airlie <airlied@redhat.com>
Mon, 8 Jun 2020 07:02:11 +0000 (17:02 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 11 Jun 2020 04:40:57 +0000 (14:40 +1000)
commit092f6226ea677812f0292cc96d0424067fa0c94e
treeb5735914db556847597dcff9bf61b86f7e83f09d
parentcc13ffffba42e8f8945666d1ab62337165c6d61e
draw/gs: fix emitting inactive primitives crash

Fixes dEQP-GLES31.functional.geometry_shading.emit.line_strip_emit_1_end_1

This test only emits 1 primitive, but the stores don't respect
the current mask, which might only have one lane active, for that single
primitive. Also fix the final emit path to use the emitted_mask
rather than the current execution mask.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5379>
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c