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:
parent
e610267510
commit
e6f5ae88a7
|
@ -771,7 +771,7 @@ bi_optimize_nir(nir_shader *nir)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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);
|
bi_context *ctx = rzalloc(NULL, bi_context);
|
||||||
ctx->nir = nir;
|
ctx->nir = nir;
|
||||||
|
|
|
@ -26,12 +26,9 @@
|
||||||
|
|
||||||
#include "compiler/nir/nir.h"
|
#include "compiler/nir/nir.h"
|
||||||
#include "util/u_dynarray.h"
|
#include "util/u_dynarray.h"
|
||||||
|
#include "panfrost/util/pan_ir.h"
|
||||||
|
|
||||||
typedef struct {
|
void bifrost_compile_shader_nir(nir_shader *nir, panfrost_program *program, unsigned product_id);
|
||||||
struct util_dynarray compiled;
|
|
||||||
} bifrost_program;
|
|
||||||
|
|
||||||
void bifrost_compile_shader_nir(nir_shader *nir, bifrost_program *program, unsigned product_id);
|
|
||||||
|
|
||||||
static const nir_shader_compiler_options bifrost_nir_options = {
|
static const nir_shader_compiler_options bifrost_nir_options = {
|
||||||
.lower_ffma = true,
|
.lower_ffma = true,
|
||||||
|
|
|
@ -51,7 +51,7 @@ compile_shader(char **argv)
|
||||||
prog = standalone_compile_shader(&options, 2, argv, &local_ctx);
|
prog = standalone_compile_shader(&options, 2, argv, &local_ctx);
|
||||||
prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->info.stage = MESA_SHADER_FRAGMENT;
|
prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->info.stage = MESA_SHADER_FRAGMENT;
|
||||||
|
|
||||||
bifrost_program compiled;
|
panfrost_program compiled;
|
||||||
for (unsigned i = 0; i < 2; ++i) {
|
for (unsigned i = 0; i < 2; ++i) {
|
||||||
nir[i] = glsl_to_nir(&local_ctx, prog, shader_types[i], &bifrost_nir_options);
|
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);
|
NIR_PASS_V(nir[i], nir_lower_global_vars_to_local);
|
||||||
|
|
Loading…
Reference in New Issue