aco/ngg: Schedule position exports of NGG VS/TES.
authorTimur Kristóf <timur.kristof@gmail.com>
Wed, 1 Apr 2020 14:02:13 +0000 (16:02 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Apr 2020 11:29:35 +0000 (11:29 +0000)
Similarly to the HW VS stage, the HW NGG GS stage also
benefits from executing these exports as early as possible.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3576>

src/amd/compiler/aco_scheduler.cpp

index d7cf90be1899727503866ee01e53cb380c382007..d07b4e381ab78446b0802120cc2fbff87e205f8c 100644 (file)
@@ -843,7 +843,7 @@ void schedule_block(sched_ctx& ctx, Program *program, Block* block, live& live_v
       }
    }
 
-   if ((program->stage & hw_vs) && block->index == program->blocks.size() - 1) {
+   if ((program->stage & (hw_vs | hw_ngg_gs)) && (block->kind & block_kind_export_end)) {
       /* Try to move position exports as far up as possible, to reduce register
        * usage and because ISA reference guides say so. */
       for (unsigned idx = 0; idx < block->instructions.size(); idx++) {