radeonsi: remove DBG_PRECOMPILE
authorMarek Olšák <marek.olsak@amd.com>
Wed, 10 Jan 2018 23:21:44 +0000 (00:21 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 31 Jan 2018 02:21:20 +0000 (03:21 +0100)
it's useless and shader-db stats only report the main shader part.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_state_shaders.c

index a8e632cf4ca013fd368c83d3a76d857b9859d8f8..d82e123b0818081e37f9c0e0524edd913bc6f800 100644 (file)
@@ -76,7 +76,6 @@ enum {
 
        /* Shader compiler options (with no effect on the shader cache): */
        DBG_CHECK_IR,
-       DBG_PRECOMPILE,
        DBG_NIR,
        DBG_MONOLITHIC_SHADERS,
        DBG_NO_OPT_VARIANT,
index b44c2fc82583bbf9f9b0c3d1c8882b116214fe84..26835d673dc5be81aa5810655846ee97524e94aa 100644 (file)
@@ -55,7 +55,6 @@ static const struct debug_named_value debug_options[] = {
 
        /* Shader compiler options (with no effect on the shader cache): */
        { "checkir", DBG(CHECK_IR), "Enable additional sanity checks on shader IR" },
-       { "precompile", DBG(PRECOMPILE), "Compile one shader variant at shader creation." },
        { "nir", DBG(NIR), "Enable experimental NIR shaders" },
        { "mono", DBG(MONOLITHIC_SHADERS), "Use old-style monolithic shaders compiled on demand" },
        { "nooptvariant", DBG(NO_OPT_VARIANT), "Disable compiling optimized shader variants." },
index 959aead892f28e4c6096bca799e9ae73e4874f0a..2c1d9901ce779bc3004ed9573c7a96c65f12fa78 100644 (file)
@@ -1785,7 +1785,6 @@ static void si_init_shader_selector_async(void *job, int thread_index)
        struct si_screen *sscreen = sel->screen;
        LLVMTargetMachineRef tm;
        struct pipe_debug_callback *debug = &sel->compiler_ctx_state.debug;
-       unsigned i;
 
        assert(!debug->debug_message || debug->async);
        assert(thread_index >= 0);
@@ -1889,54 +1888,6 @@ static void si_init_shader_selector_async(void *job, int thread_index)
                }
        }
 
-       /* Pre-compilation. */
-       if (sscreen->debug_flags & DBG(PRECOMPILE) &&
-           /* GFX9 needs LS or ES for compilation, which we don't have here. */
-           (sscreen->info.chip_class <= VI ||
-            (sel->type != PIPE_SHADER_TESS_CTRL &&
-             sel->type != PIPE_SHADER_GEOMETRY))) {
-               struct si_shader_ctx_state state = {sel};
-               struct si_shader_key key;
-
-               memset(&key, 0, sizeof(key));
-               si_parse_next_shader_property(&sel->info,
-                                             sel->so.num_outputs != 0,
-                                             &key);
-
-               /* GFX9 doesn't have LS and ES. */
-               if (sscreen->info.chip_class >= GFX9) {
-                       key.as_ls = 0;
-                       key.as_es = 0;
-               }
-
-               /* Set reasonable defaults, so that the shader key doesn't
-                * cause any code to be eliminated.
-                */
-               switch (sel->type) {
-               case PIPE_SHADER_TESS_CTRL:
-                       key.part.tcs.epilog.prim_mode = PIPE_PRIM_TRIANGLES;
-                       break;
-               case PIPE_SHADER_FRAGMENT:
-                       key.part.ps.prolog.bc_optimize_for_persp =
-                               sel->info.uses_persp_center &&
-                               sel->info.uses_persp_centroid;
-                       key.part.ps.prolog.bc_optimize_for_linear =
-                               sel->info.uses_linear_center &&
-                               sel->info.uses_linear_centroid;
-                       key.part.ps.epilog.alpha_func = PIPE_FUNC_ALWAYS;
-                       for (i = 0; i < 8; i++)
-                               if (sel->info.colors_written & (1 << i))
-                                       key.part.ps.epilog.spi_shader_col_format |=
-                                               V_028710_SPI_SHADER_FP16_ABGR << (i * 4);
-                       break;
-               }
-
-               if (si_shader_select_with_key(sscreen, &state,
-                                             &sel->compiler_ctx_state, &key,
-                                             thread_index))
-                       fprintf(stderr, "radeonsi: can't create a monolithic shader\n");
-       }
-
        /* The GS copy shader is always pre-compiled. */
        if (sel->type == PIPE_SHADER_GEOMETRY) {
                sel->gs_copy_shader = si_generate_gs_copy_shader(sscreen, tm, sel, debug);