gallivm: handle huge number of immediates
authorZack Rusin <zackr@vmware.com>
Wed, 5 Feb 2014 00:28:58 +0000 (19:28 -0500)
committerZack Rusin <zackr@vmware.com>
Thu, 6 Feb 2014 00:40:53 +0000 (19:40 -0500)
commit69ee3f431f9f1bb782485ede992b95e01ad790a5
tree97ae67573ae2f6c6532c176c31df9cdd33bf2459
parent8507afc97fa3323c89ee4cd1359d2fa61015bcd0
gallivm: handle huge number of immediates

We only supported up to 256 immediates, which isn't enough. We had
code which was allocating immediates as an allocated array, but it
was always used along a statically backed array for performance
reasons. This commit adds code to skip that performance optimization
and always use just the dynamically allocated immediates if the
number of them is too great.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_limits.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c