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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user