summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-08-03 14:53:41 +0200
committerNicolai Hähnle <[email protected]>2017-08-04 10:46:01 +0200
commit12ce39d3de55357c8274619d4da973001a4609de (patch)
tree2b8779e78fac14f3d68a2b32984cea91a1e5e185 /src/gallium/drivers/radeonsi
parent3b5743ead5d2492f65abcd4521d84c9f8de469ba (diff)
radeonsi: set drirc compiler options before calling common screen init
Also, access the options directly, allowing us to get rid of the PIPE_SCREEN_xxx flags. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index b32a77dcc46..395853c7d9f 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -987,16 +987,22 @@ 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) ||
+ /* Set these flags in debug_flags early, so that the shader cache takes
+ * them into account.
+ */
+ if (driQueryOptionb(config->options,
+ "glsl_correct_derivatives_after_discard"))
+ sscreen->b.debug_flags |= DBG_FS_CORRECT_DERIVS_AFTER_KILL;
+ if (driQueryOptionb(config->options, "radeonsi_enable_sisched"))
+ sscreen->b.debug_flags |= DBG_SI_SCHED;
+
+ if (!r600_common_screen_init(&sscreen->b, ws) ||
!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.
*/