mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 09:40:08 +01:00
pan/bi: Call Valhall backend passes on v9
These are required to lower the IR into something suitable for Valhall packing. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586>
This commit is contained in:
parent
ac5eb4934b
commit
fc81415f47
1 changed files with 21 additions and 1 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include "valhall/disassemble.h"
|
||||
#include "bifrost_compile.h"
|
||||
#include "compiler.h"
|
||||
#include "valhall/va_compiler.h"
|
||||
#include "bi_quirks.h"
|
||||
#include "bi_builder.h"
|
||||
#include "bifrost_nir.h"
|
||||
|
|
@ -4176,6 +4177,22 @@ bi_compile_variant_nir(nir_shader *nir,
|
|||
|
||||
if (ctx->arch >= 9) {
|
||||
va_optimize(ctx);
|
||||
|
||||
bi_foreach_instr_global_safe(ctx, I) {
|
||||
va_lower_isel(I);
|
||||
va_lower_constants(ctx, I);
|
||||
|
||||
bi_builder b = bi_init_builder(ctx, bi_before_instr(I));
|
||||
va_repair_fau(&b, I);
|
||||
}
|
||||
|
||||
/* We need to clean up after constant lowering */
|
||||
if (likely(optimize)) {
|
||||
bi_opt_cse(ctx);
|
||||
bi_opt_dead_code_eliminate(ctx);
|
||||
}
|
||||
|
||||
bi_validate(ctx, "Valhall passes");
|
||||
}
|
||||
|
||||
bi_foreach_block(ctx, block) {
|
||||
|
|
@ -4184,7 +4201,10 @@ bi_compile_variant_nir(nir_shader *nir,
|
|||
|
||||
if (bifrost_debug & BIFROST_DBG_SHADERS && !skip_internal)
|
||||
bi_print_shader(ctx, stdout);
|
||||
bi_lower_fau(ctx);
|
||||
|
||||
if (ctx->arch <= 8) {
|
||||
bi_lower_fau(ctx);
|
||||
}
|
||||
|
||||
/* Lowering FAU can create redundant moves. Run CSE+DCE to clean up. */
|
||||
if (likely(optimize)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue