From: Nicolai Hähnle <nicolai.haeh...@amd.com>

---
 src/gallium/drivers/radeonsi/driinfo_radeonsi.h | 3 +++
 src/gallium/drivers/radeonsi/si_pipe.c          | 4 ++++
 src/util/xmlpool/t_options.h                    | 9 +++++++++
 3 files changed, 16 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/driinfo_radeonsi.h 
b/src/gallium/drivers/radeonsi/driinfo_radeonsi.h
index a358f02..af6284a 100644
--- a/src/gallium/drivers/radeonsi/driinfo_radeonsi.h
+++ b/src/gallium/drivers/radeonsi/driinfo_radeonsi.h
@@ -1 +1,4 @@
 // DriConf options specific to radeonsi
+DRI_CONF_SECTION_PERFORMANCE
+    DRI_CONF_RADEONSI_ENABLE_SISCHED("false")
+DRI_CONF_SECTION_END
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index e51cbce..f9d7d92 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -24,20 +24,21 @@
 #include "si_pipe.h"
 #include "si_public.h"
 #include "si_shader_internal.h"
 #include "sid.h"
 
 #include "radeon/radeon_uvd.h"
 #include "util/hash_table.h"
 #include "util/u_memory.h"
 #include "util/u_suballoc.h"
 #include "util/u_tests.h"
+#include "util/xmlconfig.h"
 #include "vl/vl_decoder.h"
 #include "../ddebug/dd_util.h"
 
 /*
  * pipe_context
  */
 static void si_destroy_context(struct pipe_context *context)
 {
        struct si_context *sctx = (struct si_context *)context;
        int i;
@@ -937,20 +938,23 @@ struct pipe_screen *radeonsi_screen_create(struct 
radeon_winsys *ws,
 
        si_init_screen_state_functions(sscreen);
 
        if (!r600_common_screen_init(&sscreen->b, ws, config->flags) ||
            !si_init_gs_info(sscreen) ||
            !si_init_shader_cache(sscreen)) {
                FREE(sscreen);
                return NULL;
        }
 
+       if (driQueryOptionb(config->options, "radeonsi_enable_sisched"))
+               sscreen->b.debug_flags |= DBG_SI_SCHED;
+
        /* Only enable as many threads as we have target machines, but at most
         * the number of CPUs - 1 if there is more than one.
         */
        num_threads = sysconf(_SC_NPROCESSORS_ONLN);
        num_threads = MAX2(1, num_threads - 1);
        num_compiler_threads = MIN2(num_threads, ARRAY_SIZE(sscreen->tm));
        num_compiler_threads_lowprio =
                MIN2(num_threads, ARRAY_SIZE(sscreen->tm_low_priority));
 
        if (!util_queue_init(&sscreen->shader_compiler_queue, "si_shader",
diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h
index 9aa1798..fcf65cd 100644
--- a/src/util/xmlpool/t_options.h
+++ b/src/util/xmlpool/t_options.h
@@ -417,10 +417,19 @@ DRI_CONF_OPT_END
 
 #define DRI_CONF_NINE_TEARFREEDISCARD(def) \
 DRI_CONF_OPT_BEGIN_B(tearfree_discard, def) \
         DRI_CONF_DESC(en,gettext("Whether to make d3d's presentation mode 
DISCARD (games usually use that mode) Tear Free. If rendering above screen 
refresh, some frames will get skipped. false by default.")) \
 DRI_CONF_OPT_END
 
 #define DRI_CONF_NINE_CSMT(def) \
 DRI_CONF_OPT_BEGIN(csmt_force, int, def) \
         DRI_CONF_DESC(en,gettext("If set to 1, force gallium nine CSMT. If set 
to 0, disable it. By default (-1) CSMT is enabled on known thread-safe 
drivers.")) \
 DRI_CONF_OPT_END
+
+/**
+ * \brief radeonsi specific configuration options
+ */
+
+#define DRI_CONF_RADEONSI_ENABLE_SISCHED(def) \
+DRI_CONF_OPT_BEGIN_B(radeonsi_enable_sisched, def) \
+        DRI_CONF_DESC(en,gettext("Use the LLVM sisched option for shader 
compiles")) \
+DRI_CONF_OPT_END
-- 
2.9.3

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

Reply via email to