Module: Mesa
Branch: master
Commit: 1388c25ada4395d3cd479c2b075b753fc73d33ce
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1388c25ada4395d3cd479c2b075b753fc73d33ce

Author: Marek Olšák <[email protected]>
Date:   Sun Sep  6 10:54:53 2020 -0400

radeonsi: inline trivial PS functions

Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6623>

---

 src/gallium/drivers/radeonsi/si_shader_llvm_ps.c | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm_ps.c 
b/src/gallium/drivers/radeonsi/si_shader_llvm_ps.c
index 78cdadb269b..1f233e1b96c 100644
--- a/src/gallium/drivers/radeonsi/si_shader_llvm_ps.c
+++ b/src/gallium/drivers/radeonsi/si_shader_llvm_ps.c
@@ -241,16 +241,6 @@ struct si_ps_exports {
    struct ac_export_args args[10];
 };
 
-static void si_export_mrt_z(struct si_shader_context *ctx, LLVMValueRef depth, 
LLVMValueRef stencil,
-                            LLVMValueRef samplemask, struct si_ps_exports *exp)
-{
-   struct ac_export_args args;
-
-   ac_export_mrt_z(&ctx->ac, depth, stencil, samplemask, &args);
-
-   memcpy(&exp->args[exp->num++], &args, sizeof(args));
-}
-
 /* Initialize arguments for the shader export intrinsic */
 static void si_llvm_init_ps_export_args(struct si_shader_context *ctx, 
LLVMValueRef *values,
                                         unsigned cbuf, unsigned 
compacted_mrt_index,
@@ -437,12 +427,6 @@ static bool si_export_mrt_color(struct si_shader_context 
*ctx, LLVMValueRef *col
    return true;
 }
 
-static void si_emit_ps_exports(struct si_shader_context *ctx, struct 
si_ps_exports *exp)
-{
-   for (unsigned i = 0; i < exp->num; i++)
-      ac_build_export(&ctx->ac, &exp->args[i]);
-}
-
 /**
  * Return PS outputs in this order:
  *
@@ -903,12 +887,14 @@ void si_llvm_build_ps_epilog(struct si_shader_context 
*ctx, union si_shader_part
       samplemask = LLVMGetParam(ctx->main_fn, vgpr++);
 
    if (depth || stencil || samplemask)
-      si_export_mrt_z(ctx, depth, stencil, samplemask, &exp);
+      ac_export_mrt_z(&ctx->ac, depth, stencil, samplemask, 
&exp.args[exp.num++]);
    else if (last_color_export == -1)
       ac_build_export_null(&ctx->ac);
 
-   if (exp.num)
-      si_emit_ps_exports(ctx, &exp);
+   if (exp.num) {
+      for (unsigned i = 0; i < exp.num; i++)
+         ac_build_export(&ctx->ac, &exp.args[i]);
+   }
 
    /* Compile. */
    LLVMBuildRetVoid(ctx->ac.builder);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to