...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>
}
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;
#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,
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);