From: Marek Olšák <marek.ol...@amd.com>

before LLVM target machines are created
---
 src/gallium/drivers/radeonsi/si_pipe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index d3d0c0ef075..22e333aec77 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -781,20 +781,21 @@ struct pipe_screen *radeonsi_screen_create(struct 
radeon_winsys *ws,
 {
        struct si_screen *sscreen = CALLOC_STRUCT(si_screen);
        unsigned hw_threads, num_comp_hi_threads, num_comp_lo_threads, i;
 
        if (!sscreen) {
                return NULL;
        }
 
        sscreen->ws = ws;
        ws->query_info(ws, &sscreen->info);
+       si_handle_env_var_force_family(sscreen);
 
        sscreen->debug_flags = debug_get_flags_option("R600_DEBUG",
                                                        debug_options, 0);
 
        /* Set functions first. */
        sscreen->b.context_create = si_pipe_create_context;
        sscreen->b.destroy = si_destroy_screen;
 
        si_init_screen_get_functions(sscreen);
        si_init_screen_buffer_functions(sscreen);
@@ -870,22 +871,20 @@ struct pipe_screen *radeonsi_screen_create(struct 
radeon_winsys *ws,
        if (!util_queue_init(&sscreen->shader_compiler_queue_low_priority,
                             "shlo",
                             64, num_comp_lo_threads,
                             UTIL_QUEUE_INIT_RESIZE_IF_FULL |
                             UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY)) {
               si_destroy_shader_cache(sscreen);
               FREE(sscreen);
               return NULL;
        }
 
-       si_handle_env_var_force_family(sscreen);
-
        if (!debug_get_bool_option("RADEON_DISABLE_PERFCOUNTERS", false))
                si_init_perfcounters(sscreen);
 
        /* Determine tessellation ring info. */
        bool double_offchip_buffers = sscreen->info.chip_class >= CIK &&
                                      sscreen->info.family != CHIP_CARRIZO &&
                                      sscreen->info.family != CHIP_STONEY;
        /* This must be one less than the maximum number due to a hw limitation.
         * Various hardware bugs in SI, CIK, and GFX9 need this.
         */
-- 
2.17.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to