radeonsi: allocate the array of immediates dynamically
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 11 Jan 2017 13:50:41 +0000 (14:50 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 13 Jan 2017 09:40:57 +0000 (10:40 +0100)
commit6f0d955b6d5017ad76752555c1a4214c16e92622
tree1506a6bcbe5aabc5cd90397252551f0ff38d8bf0
parentcb89d19dbbaac301534e7a543bb9bcd740b05008
radeonsi: allocate the array of immediates dynamically

Currently, we can store up to 256 immediates in a static array,
but this is not always enough. Instead, allocate a dynamic array
like what we currently do for temps.

This fixes a segfault with
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.23

No regressions found with full piglit run.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader_internal.h
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c