diff options
author | Józef Kucia <[email protected]> | 2018-09-24 00:44:00 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-10-02 17:13:52 -0400 |
commit | e24a4e05c7a7b9f3a06fa55284d6258ceff44fdd (patch) | |
tree | 9a2326a82971cdc3078628ab30bcc09e627bae2b /src | |
parent | 08f97407fb14f53bf9f43dc4165a185418437a6b (diff) |
radeonsi: avoid sending GS_EMIT in shaders without outputs
Fixes GPU hangs.
Cc: 18.1 18.2 <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107857
Signed-off-by: Józef Kucia <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 36f58e2ce52..fedc616ebf6 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -4326,9 +4326,12 @@ static void si_llvm_emit_vertex(struct ac_shader_abi *abi, gs_next_vertex = LLVMBuildAdd(ctx->ac.builder, gs_next_vertex, ctx->i32_1, ""); LLVMBuildStore(ctx->ac.builder, gs_next_vertex, ctx->gs_next_vertex[stream]); - /* Signal vertex emission */ - ac_build_sendmsg(&ctx->ac, AC_SENDMSG_GS_OP_EMIT | AC_SENDMSG_GS | (stream << 8), - si_get_gs_wave_id(ctx)); + /* Signal vertex emission if vertex data was written. */ + if (offset) { + ac_build_sendmsg(&ctx->ac, AC_SENDMSG_GS_OP_EMIT | AC_SENDMSG_GS | (stream << 8), + si_get_gs_wave_id(ctx)); + } + if (!use_kill) lp_build_endif(&if_state); } |