radeonsi/gfx9: fix crash building monolithic merged ES-GS shader

Forwarding from the ES prolog to the ES just barely exceeds the current
maximum array size when 16 vertex attributes are used. Give it a decent
bump to account for merged shaders having up to 32 user SGPRs.

Fixes a crash in GL45-CTS.multi_bind.draw_bind_vertex_buffers.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit c22e3c5373)
[Emil Velikov: resolve trivial conflicts - drop initial[] hunk]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

Conflicts:
	src/gallium/drivers/radeonsi/si_shader.c
This commit is contained in:
Nicolai Hähnle 2017-07-12 15:38:57 +02:00 committed by Emil Velikov
parent fc41e3b74a
commit 68ebae30df

View file

@ -7357,8 +7357,8 @@ static void si_build_wrapper_function(struct si_shader_context *ctx,
struct gallivm_state *gallivm = &ctx->gallivm;
LLVMBuilderRef builder = ctx->gallivm.builder;
/* PS epilog has one arg per color component */
LLVMTypeRef param_types[48];
LLVMValueRef out[48];
LLVMTypeRef param_types[64];
LLVMValueRef out[64];
LLVMTypeRef function_type;
unsigned num_params;
unsigned num_out;
@ -7525,6 +7525,7 @@ static void si_build_wrapper_function(struct si_shader_context *ctx,
LLVMValueRef val =
LLVMBuildExtractValue(builder, ret, i, "");
assert(num_out < ARRAY_SIZE(out));
out[num_out++] = val;
if (LLVMTypeOf(val) == ctx->i32) {