summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-01-19 14:47:50 +1000
committerDave Airlie <[email protected]>2017-01-31 09:29:48 +1000
commit2a56186d571d22bc3089b945c927393e06dbc569 (patch)
tree5b82da30e96e9788cc165cc4a9890afba700e156 /src/amd
parenta615a01942c168bf6dbb7621cab3c349354883cc (diff)
radv/ac: handle emitting gs epilogue
Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 6e97ae3322a..f046badc60b 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4466,6 +4466,17 @@ handle_fs_outputs_post(struct nir_to_llvm_context *ctx)
}
static void
+emit_gs_epilogue(struct nir_to_llvm_context *ctx)
+{
+ LLVMValueRef args[2];
+
+ args[0] = LLVMConstInt(ctx->i32, SENDMSG_GS_OP_NOP | SENDMSG_GS_DONE, false);
+ args[1] = ctx->gs_wave_id;
+ ac_emit_llvm_intrinsic(&ctx->ac, "llvm.SI.sendmsg",
+ ctx->voidt, args, 2, 0);
+}
+
+static void
handle_shader_outputs_post(struct nir_to_llvm_context *ctx)
{
switch (ctx->stage) {
@@ -4475,6 +4486,9 @@ handle_shader_outputs_post(struct nir_to_llvm_context *ctx)
case MESA_SHADER_FRAGMENT:
handle_fs_outputs_post(ctx);
break;
+ case MESA_SHADER_GEOMETRY:
+ emit_gs_epilogue(ctx);
+ break;
default:
break;
}