diff options
author | Nicolai Hähnle <[email protected]> | 2017-07-12 15:38:57 +0200 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-08-03 00:19:05 +0100 |
commit | 68ebae30dfc895bfe769d0555a01681e40c8bbaf (patch) | |
tree | 322db003645e102fc30d6f48167d2dc97d33c27b /src/gallium/drivers | |
parent | fc41e3b74a0195118989289f7f1dff53079ce643 (diff) |
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: [email protected]
Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit c22e3c5373ad0df160f13fe8271c32e8d7e61b43)
[Emil Velikov: resolve trivial conflicts - drop initial[] hunk]
Signed-off-by: Emil Velikov <[email protected]>
Conflicts:
src/gallium/drivers/radeonsi/si_shader.c
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index ff18272257a..bba97cce60c 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -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) { |