[Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

Grigori Goronzy greg at chown.ath.cx
Sun Jun 25 10:55:14 UTC 2017


On 2017-06-22 17:10, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> +2.3% better score on Fiji. It might be better without HBM.

Is this really useful? Superposition is a benchmark. It would make more 
sense if this also targeted some actual games.
Optimizations specific to only benchmarks are considered "cheating" 
sometimes.

Best regards
Grigori

> ---
>  src/gallium/drivers/radeonsi/si_pipe.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c
> b/src/gallium/drivers/radeonsi/si_pipe.c
> index ff787ad..4088849 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -935,20 +935,27 @@ struct pipe_screen
> *radeonsi_screen_create(struct radeon_winsys *ws,
> 
>  	si_init_screen_state_functions(sscreen);
> 
>  	if (!r600_common_screen_init(&sscreen->b, ws, flags) ||
>  	    !si_init_gs_info(sscreen) ||
>  	    !si_init_shader_cache(sscreen)) {
>  		FREE(sscreen);
>  		return NULL;
>  	}
> 
> +	/* Enable sisched where it helps. */
> +	char process[128];
> +	if (os_get_process_name(process, sizeof(process)) &&
> +	    /* Unigine Superposition */
> +	    !strcmp(process, "superposition"))
> +		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",


More information about the mesa-dev mailing list