draw/gs: use mask to limit vertex emission.
authorDave Airlie <airlied@redhat.com>
Mon, 6 Jul 2020 02:06:46 +0000 (12:06 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 7 Jul 2020 20:06:14 +0000 (06:06 +1000)
commitd146d7bb97df94869684f06d075cb54374e5faac
tree6fd52ed2132bbd8a3ca601f852693f164171d58a
parent72ed9e7046d437943cf2c8ac8f04147f88125cd1
draw/gs: use mask to limit vertex emission.

When executing for a single primitive, the mask has only one active
lane, however the vertex emit emits for all the lanes, pass in
the active mask and write the excess lanes to the overflow slot.

Fixes:
glsl-1.50-gs-max-output -scan 1 20

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555>
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
src/gallium/drivers/swr/swr_shader.cpp