gallivm: fix stream id fetch
authorRoland Scheidegger <sroland@vmware.com>
Thu, 2 Apr 2020 05:09:50 +0000 (07:09 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 2 Apr 2020 15:53:23 +0000 (15:53 +0000)
commit2077421437038e3bd73544c34f567601b912ce09
treef16c914038d300d2fb7b1ab6a2083109a4d99142
parent0a3a8806707b7ba4fc2e79896b63c35b1d9f80f6
gallivm: fix stream id fetch

Fetching the stream id directly can crash since bld->immediates may not
exist (if there's too many immediates or we use the array due to indirect
accesses). So just call emit_fetch_immediate instead.

v2: fix the swizzle

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4416>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4416>
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c