Mesa (master): iris: Remove context from iris_debug_recompile

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 11 20:57:04 UTC 2021


Module: Mesa
Branch: master
Commit: 979434639e61d2b08c293949ead2f6b06467de7c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=979434639e61d2b08c293949ead2f6b06467de7c

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Feb  8 17:50:41 2021 -0800

iris: Remove context from iris_debug_recompile

This doesn't and shouldn't use the context.  It just wants a debug
callback to print things on.

Fixes: 84a38ec1336 ("iris: Enable PIPE_CAP_SHAREABLE_SHADERS.")
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8922>

---

 src/gallium/drivers/iris/iris_program.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c
index 47559b91dbd..57fc9c8995f 100644
--- a/src/gallium/drivers/iris/iris_program.c
+++ b/src/gallium/drivers/iris/iris_program.c
@@ -1021,7 +1021,8 @@ iris_setup_binding_table(const struct gen_device_info *devinfo,
 }
 
 static void
-iris_debug_recompile(struct iris_context *ice,
+iris_debug_recompile(struct iris_screen *screen,
+                     struct pipe_debug_callback *dbg,
                      struct iris_uncompiled_shader *ish,
                      const struct brw_base_prog_key *key)
 {
@@ -1029,12 +1030,11 @@ iris_debug_recompile(struct iris_context *ice,
             || list_is_singular(&ish->variants))
       return;
 
-   struct iris_screen *screen = (struct iris_screen *) ice->ctx.screen;
    const struct gen_device_info *devinfo = &screen->devinfo;
    const struct brw_compiler *c = screen->compiler;
    const struct shader_info *info = &ish->nir->info;
 
-   c->shader_perf_log(&ice->dbg, "Recompiling %s shader for program %s: %s\n",
+   c->shader_perf_log(dbg, "Recompiling %s shader for program %s: %s\n",
                       _mesa_shader_stage_to_string(info->stage),
                       info->name ? info->name : "(no identifier)",
                       info->label ? info->label : "");
@@ -1068,7 +1068,7 @@ iris_debug_recompile(struct iris_context *ice,
       unreachable("invalid shader stage");
    }
 
-   brw_debug_key_recompile(c, &ice->dbg, info->stage, &old_key.base, key);
+   brw_debug_key_recompile(c, dbg, info->stage, &old_key.base, key);
 }
 
 static void
@@ -1209,7 +1209,7 @@ iris_compile_vs(struct iris_context *ice,
       return false;
    }
 
-   iris_debug_recompile(ice, ish, &brw_key.base);
+   iris_debug_recompile(screen, &ice->dbg, ish, &brw_key.base);
 
    uint32_t *so_decls =
       screen->vtbl.create_so_decl_list(&ish->stream_output,
@@ -1397,7 +1397,7 @@ iris_compile_tcs(struct iris_context *ice,
       return false;
    }
 
-   iris_debug_recompile(ice, ish, &brw_key.base);
+   iris_debug_recompile(screen, &ice->dbg, ish, &brw_key.base);
 
    struct iris_compiled_shader *shader =
       iris_upload_shader(ice, ish, IRIS_CACHE_TCS, sizeof(*key), key, program,
@@ -1522,7 +1522,7 @@ iris_compile_tes(struct iris_context *ice,
       return false;
    }
 
-   iris_debug_recompile(ice, ish, &brw_key.base);
+   iris_debug_recompile(screen, &ice->dbg, ish, &brw_key.base);
 
    uint32_t *so_decls =
       screen->vtbl.create_so_decl_list(&ish->stream_output,
@@ -1644,7 +1644,7 @@ iris_compile_gs(struct iris_context *ice,
       return false;
    }
 
-   iris_debug_recompile(ice, ish, &brw_key.base);
+   iris_debug_recompile(screen, &ice->dbg, ish, &brw_key.base);
 
    uint32_t *so_decls =
       screen->vtbl.create_so_decl_list(&ish->stream_output,
@@ -1763,7 +1763,7 @@ iris_compile_fs(struct iris_context *ice,
       return false;
    }
 
-   iris_debug_recompile(ice, ish, &brw_key.base);
+   iris_debug_recompile(screen, &ice->dbg, ish, &brw_key.base);
 
    struct iris_compiled_shader *shader =
       iris_upload_shader(ice, ish, IRIS_CACHE_FS, sizeof(*key), key, program,
@@ -2015,7 +2015,7 @@ iris_compile_cs(struct iris_context *ice,
       return false;
    }
 
-   iris_debug_recompile(ice, ish, &brw_key.base);
+   iris_debug_recompile(screen, &ice->dbg, ish, &brw_key.base);
 
    struct iris_compiled_shader *shader =
       iris_upload_shader(ice, ish, IRIS_CACHE_CS, sizeof(*key), key, program,



More information about the mesa-commit mailing list