From: Alyssa Rosenzweig Date: Tue, 10 Mar 2020 20:09:44 +0000 (-0400) Subject: pan/bi: Switch to panfrost_program X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e6f5ae88a7ff758bc9a506488f7930d53b68ab19;p=mesa.git pan/bi: Switch to panfrost_program ...now that it's shared. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 5e822299094..39ae2a62748 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -771,7 +771,7 @@ bi_optimize_nir(nir_shader *nir) } void -bifrost_compile_shader_nir(nir_shader *nir, bifrost_program *program, unsigned product_id) +bifrost_compile_shader_nir(nir_shader *nir, panfrost_program *program, unsigned product_id) { bi_context *ctx = rzalloc(NULL, bi_context); ctx->nir = nir; diff --git a/src/panfrost/bifrost/bifrost_compile.h b/src/panfrost/bifrost/bifrost_compile.h index 8f1e9f1bc8d..ff0e7c38428 100644 --- a/src/panfrost/bifrost/bifrost_compile.h +++ b/src/panfrost/bifrost/bifrost_compile.h @@ -26,12 +26,9 @@ #include "compiler/nir/nir.h" #include "util/u_dynarray.h" +#include "panfrost/util/pan_ir.h" -typedef struct { - struct util_dynarray compiled; -} bifrost_program; - -void bifrost_compile_shader_nir(nir_shader *nir, bifrost_program *program, unsigned product_id); +void bifrost_compile_shader_nir(nir_shader *nir, panfrost_program *program, unsigned product_id); static const nir_shader_compiler_options bifrost_nir_options = { .lower_ffma = true, diff --git a/src/panfrost/bifrost/cmdline.c b/src/panfrost/bifrost/cmdline.c index 73fbaad1360..30120d32e3c 100644 --- a/src/panfrost/bifrost/cmdline.c +++ b/src/panfrost/bifrost/cmdline.c @@ -51,7 +51,7 @@ compile_shader(char **argv) prog = standalone_compile_shader(&options, 2, argv, &local_ctx); prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->info.stage = MESA_SHADER_FRAGMENT; - bifrost_program compiled; + panfrost_program compiled; for (unsigned i = 0; i < 2; ++i) { nir[i] = glsl_to_nir(&local_ctx, prog, shader_types[i], &bifrost_nir_options); NIR_PASS_V(nir[i], nir_lower_global_vars_to_local);