radeonsi: prefix function with si_ to prevent name collision
authorWinLinux1028 <reimu@hakurei.win>
Tue, 11 Jul 2023 09:16:01 +0000 (18:16 +0900)
committer‮8201‭Linux‬niW <reimu@hakurei.win>
Fri, 14 Jul 2023 22:37:05 +0000 (22:37 +0000)
Fixed a build error caused by multiple gfx11_init_query symbols when building with iris and radeonsi specified in gallium-drivers.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9238
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24045>

src/gallium/drivers/radeonsi/gfx11_query.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h

index bfcd8e2..2a331cc 100644 (file)
@@ -422,13 +422,13 @@ struct pipe_query *gfx11_sh_query_create(struct si_screen *screen, enum pipe_que
    return (struct pipe_query *)query;
 }
 
-void gfx11_init_query(struct si_context *sctx)
+void si_gfx11_init_query(struct si_context *sctx)
 {
    list_inithead(&sctx->shader_query_buffers);
    sctx->atoms.s.shader_query.emit = emit_shader_query;
 }
 
-void gfx11_destroy_query(struct si_context *sctx)
+void si_gfx11_destroy_query(struct si_context *sctx)
 {
    if (!sctx->shader_query_buffers.next)
       return;
index fb5c02c..2b4fceb 100644 (file)
@@ -192,7 +192,7 @@ static void si_destroy_context(struct pipe_context *context)
    si_release_all_descriptors(sctx);
 
    if (sctx->gfx_level >= GFX10 && sctx->has_graphics)
-      gfx11_destroy_query(sctx);
+      si_gfx11_destroy_query(sctx);
 
    if (sctx->sqtt) {
       struct si_screen *sscreen = sctx->screen;
@@ -637,7 +637,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
    /* Initialize graphics-only context functions. */
    if (sctx->has_graphics) {
       if (sctx->gfx_level >= GFX10)
-         gfx11_init_query(sctx);
+         si_gfx11_init_query(sctx);
       si_init_msaa_functions(sctx);
       si_init_shader_functions(sctx);
       si_init_state_functions(sctx);
index 55f1d17..3897168 100644 (file)
@@ -1616,8 +1616,8 @@ void *si_create_query_result_cs(struct si_context *sctx);
 void *gfx11_create_sh_query_result_cs(struct si_context *sctx);
 
 /* gfx11_query.c */
-void gfx11_init_query(struct si_context *sctx);
-void gfx11_destroy_query(struct si_context *sctx);
+void si_gfx11_init_query(struct si_context *sctx);
+void si_gfx11_destroy_query(struct si_context *sctx);
 
 /* si_test_image_copy_region.c */
 void si_test_image_copy_region(struct si_screen *sscreen);