summaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-14 12:48:04 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-14 22:54:07 +0000
commit64720d1e9e36fa49b7bcea4bfdb4b998bdceadae (patch)
tree60edef3b3143e9c60e3b3ca05f9f4e9f25585500 /src/panfrost
parentb93fa7d232ed702bbfbd343b1eb77cf2d62742b8 (diff)
pan/bifrost: Link in compiler
We enable the standalone compiler, build the new files, and let it blast. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/bifrost/cmdline.c11
-rw-r--r--src/panfrost/bifrost/meson.build7
2 files changed, 12 insertions, 6 deletions
diff --git a/src/panfrost/bifrost/cmdline.c b/src/panfrost/bifrost/cmdline.c
index 1abd932530b..16415bbd755 100644
--- a/src/panfrost/bifrost/cmdline.c
+++ b/src/panfrost/bifrost/cmdline.c
@@ -52,7 +52,6 @@ compile_shader(char **argv)
prog = standalone_compile_shader(&options, 2, argv, &local_ctx);
prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->info.stage = MESA_SHADER_FRAGMENT;
-#if 0
struct bifrost_program compiled;
for (unsigned i = 0; i < 2; ++i) {
nir[i] = glsl_to_nir(&local_ctx, prog, shader_types[i], &bifrost_nir_options);
@@ -69,7 +68,6 @@ compile_shader(char **argv)
NIR_PASS_V(nir[i], nir_opt_constant_folding);
bifrost_compile_shader_nir(nir[i], &compiled);
}
-#endif
}
static void
@@ -100,10 +98,13 @@ main(int argc, char **argv)
printf("Pass a command\n");
exit(1);
}
- if (strcmp(argv[1], "compile") == 0) {
+
+ if (strcmp(argv[1], "compile") == 0)
compile_shader(&argv[2]);
- } else if (strcmp(argv[1], "disasm") == 0) {
+ else if (strcmp(argv[1], "disasm") == 0)
disassemble(argv[2]);
- }
+ else
+ unreachable("Unknown command. Valid: compile/disasm");
+
return 0;
}
diff --git a/src/panfrost/bifrost/meson.build b/src/panfrost/bifrost/meson.build
index 1258cd04caf..b49170a35ff 100644
--- a/src/panfrost/bifrost/meson.build
+++ b/src/panfrost/bifrost/meson.build
@@ -20,13 +20,18 @@
# SOFTWARE.
libpanfrost_bifrost_files = files(
+ 'bifrost_compile.c',
+ 'bifrost_opts.c',
+ 'bifrost_sched.c',
+ 'bifrost_print.c',
'disassemble.c',
)
libpanfrost_bifrost = static_library(
'panfrost_bifrost',
[libpanfrost_bifrost_files],
- include_directories : [inc_common],
+ include_directories : [inc_common, inc_include, inc_src],
+ dependencies: [idep_nir],
c_args : [c_vis_args, no_override_init_args],
cpp_args : [cpp_vis_args],
build_by_default : false,