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

Author: Tony Wasserka <[email protected]>
Date:   Tue Oct 13 15:59:08 2020 +0200

aco/isel: Remove now unused VS-related code from create_null_export

Also replaced a hardcoded constant with the appropriate register macro.

Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7102>

---

 src/amd/compiler/aco_instruction_selection.cpp | 27 +++++++++++++-------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp 
b/src/amd/compiler/aco_instruction_selection.cpp
index 79e0fa86e51..d5ba2bd92cd 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -10070,19 +10070,6 @@ static bool visit_cf_list(isel_context *ctx,
    return false;
 }
 
-static void create_null_export(isel_context *ctx)
-{
-   /* Some shader stages always need to have exports.
-    * So when there is none, we need to add a null export.
-    */
-
-   unsigned dest = (ctx->program->stage & hw_fs) ? 9 /* NULL */ : 
V_008DFC_SQ_EXP_POS;
-   bool vm = (ctx->program->stage & hw_fs) || ctx->program->chip_class >= 
GFX10;
-   Builder bld(ctx->program, ctx->block);
-   bld.exp(aco_opcode::exp, Operand(v1), Operand(v1), Operand(v1), Operand(v1),
-           /* enabled_mask */ 0, dest, /* compr */ false, /* done */ true, vm);
-}
-
 static void export_vs_varying(isel_context *ctx, int slot, bool is_pos, int 
*next_pos)
 {
    assert(ctx->stage & (hw_vs | hw_ngg_gs));
@@ -10491,6 +10478,18 @@ static bool export_fs_mrt_color(isel_context *ctx, int 
slot)
    return true;
 }
 
+static void create_fs_null_export(isel_context *ctx)
+{
+   /* FS must always have exports.
+    * So when there are none, we need to add a null export.
+    */
+
+   Builder bld(ctx->program, ctx->block);
+   unsigned dest = V_008DFC_SQ_EXP_NULL;
+   bld.exp(aco_opcode::exp, Operand(v1), Operand(v1), Operand(v1), Operand(v1),
+           /* enabled_mask */ 0, dest, /* compr */ false, /* done */ true, /* 
vm */ true);
+}
+
 static void create_fs_exports(isel_context *ctx)
 {
    bool exported = false;
@@ -10507,7 +10506,7 @@ static void create_fs_exports(isel_context *ctx)
          exported |= export_fs_mrt_color(ctx, i);
 
    if (!exported)
-      create_null_export(ctx);
+      create_fs_null_export(ctx);
 }
 
 static void create_workgroup_barrier(Builder& bld)

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

Reply via email to