pan/bi: Switch to panfrost_program
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 10 Mar 2020 20:09:44 +0000 (16:09 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 11 Mar 2020 20:28:20 +0000 (20:28 +0000)
...now that it's shared.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150>

src/panfrost/bifrost/bifrost_compile.c
src/panfrost/bifrost/bifrost_compile.h
src/panfrost/bifrost/cmdline.c

index 5e8222990940d86faf48816521892ccce3421c34..39ae2a62748eec5899c8f9ef68a61ff722dc5c3f 100644 (file)
@@ -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;
index 8f1e9f1bc8d48fc2312a58ae7bfeb006e207dd42..ff0e7c38428958403182ddcbe9f6ac6a5621b1c9 100644 (file)
 
 #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,
index 73fbaad136068682222252c39018092f91455516..30120d32e3c705eebc8aa0e4985e65fe749dd8f1 100644 (file)
@@ -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);