pan/bi: Switch to panfrost_program

...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>
This commit is contained in:
Alyssa Rosenzweig 2020-03-10 16:09:44 -04:00 committed by Marge Bot
parent e610267510
commit e6f5ae88a7
3 changed files with 4 additions and 7 deletions

View 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;

View File

@ -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,

View 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);