lima: add summary report for shader-db

Very basic summary, loops and gpir spills:fills are not updated yet and
are only there to comply with the strings to shader-db report.py regex.

For now it can be used to analyze the impact of changes in instruction
count in both gpir and ppir.

The LIMA_DEBUG=shaderdb setting can be useful to output stats on
applications other than shader-db.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
This commit is contained in:
Erico Nunes
2019-08-03 10:56:12 +02:00
parent 9e41a514a8
commit e0aeee9460
10 changed files with 80 additions and 6 deletions

View File

@@ -214,6 +214,7 @@ static void *
lima_create_fs_state(struct pipe_context *pctx,
const struct pipe_shader_state *cso)
{
struct lima_context *ctx = lima_context(pctx);
struct lima_screen *screen = lima_screen(pctx->screen);
struct lima_fs_shader_state *so = rzalloc(NULL, struct lima_fs_shader_state);
@@ -234,7 +235,7 @@ lima_create_fs_state(struct pipe_context *pctx,
if (lima_debug & LIMA_DEBUG_PP)
nir_print_shader(nir, stdout);
if (!ppir_compile_nir(so, nir, screen->pp_ra)) {
if (!ppir_compile_nir(so, nir, screen->pp_ra, &ctx->debug)) {
ralloc_free(so);
return NULL;
}
@@ -306,6 +307,7 @@ static void *
lima_create_vs_state(struct pipe_context *pctx,
const struct pipe_shader_state *cso)
{
struct lima_context *ctx = lima_context(pctx);
struct lima_vs_shader_state *so = rzalloc(NULL, struct lima_vs_shader_state);
if (!so)
@@ -325,7 +327,7 @@ lima_create_vs_state(struct pipe_context *pctx,
if (lima_debug & LIMA_DEBUG_GP)
nir_print_shader(nir, stdout);
if (!gpir_compile_nir(so, nir)) {
if (!gpir_compile_nir(so, nir, &ctx->debug)) {
ralloc_free(so);
return NULL;
}