summaryrefslogtreecommitdiff
path: root/src/panfrost
diff options
context:
space:
mode:
authorIcecream95 <ixn@keemail.me>2020-09-26 12:19:14 +1200
committerMarge Bot <eric+marge@anholt.net>2020-09-28 12:25:57 +0000
commit756441b2979c2664aaa13a67dbdaf5b7e853286e (patch)
treed2a8428189713d270b36b497421cb5de801ad59c /src/panfrost
parent90eaaada0d1d2479c777241948e8ec59d7cfe996 (diff)
pan/mdg: Infer whether to disassemble shaders from info.internal
Blit shaders are now marked as internal, so remove the silent argument from midgard_compile_shader_nir and instead use nir->info.internal to suppress disassembling shaders. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6870>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/lib/pan_blit.c2
-rw-r--r--src/panfrost/midgard/midgard_compile.c8
-rw-r--r--src/panfrost/midgard/midgard_compile.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/panfrost/lib/pan_blit.c b/src/panfrost/lib/pan_blit.c
index 55f335c4828..26c56086b53 100644
--- a/src/panfrost/lib/pan_blit.c
+++ b/src/panfrost/lib/pan_blit.c
@@ -98,7 +98,7 @@ panfrost_build_blit_shader(panfrost_program *program, unsigned gpu_id, gl_frag_r
else
nir_store_var(b, c_out, nir_channel(b, &tex->dest.ssa, 0), 0xFF);
- midgard_compile_shader_nir(shader, program, false, 0, gpu_id, false, true);
+ midgard_compile_shader_nir(shader, program, false, 0, gpu_id, false);
ralloc_free(shader);
}
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index 534eaad9d5e..412d836b1e5 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -2946,7 +2946,7 @@ mir_add_writeout_loops(compiler_context *ctx)
}
int
-midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_blend, unsigned blend_rt, unsigned gpu_id, bool shaderdb, bool silent)
+midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_blend, unsigned blend_rt, unsigned gpu_id, bool shaderdb)
{
struct util_dynarray *compiled = &program->compiled;
@@ -3006,7 +3006,7 @@ midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_b
NIR_PASS_V(nir, midgard_nir_reorder_writeout);
- if ((midgard_debug & MIDGARD_DBG_SHADERS) && !silent) {
+ if ((midgard_debug & MIDGARD_DBG_SHADERS) && !nir->info.internal) {
nir_print_shader(nir, stdout);
}
@@ -3140,10 +3140,10 @@ midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_b
program->blend_patch_offset = ctx->blend_constant_offset;
program->tls_size = ctx->tls_size;
- if ((midgard_debug & MIDGARD_DBG_SHADERS) && !silent)
+ if ((midgard_debug & MIDGARD_DBG_SHADERS) && !nir->info.internal)
disassemble_midgard(stdout, program->compiled.data, program->compiled.size, gpu_id, ctx->stage);
- if ((midgard_debug & MIDGARD_DBG_SHADERDB || shaderdb) && !silent) {
+ if ((midgard_debug & MIDGARD_DBG_SHADERDB || shaderdb) && !nir->info.internal) {
unsigned nr_bundles = 0, nr_ins = 0;
/* Count instructions and bundles */
diff --git a/src/panfrost/midgard/midgard_compile.h b/src/panfrost/midgard/midgard_compile.h
index fabed8bb5b2..b4c5a07056f 100644
--- a/src/panfrost/midgard/midgard_compile.h
+++ b/src/panfrost/midgard/midgard_compile.h
@@ -29,7 +29,7 @@
#include "panfrost/util/pan_ir.h"
int
-midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_blend, unsigned blend_rt, unsigned gpu_id, bool shaderdb, bool silent);
+midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_blend, unsigned blend_rt, unsigned gpu_id, bool shaderdb);
/* NIR options are shared between the standalone compiler and the online
* compiler. Defining it here is the simplest, though maybe not the Right