rscreen->b.b.get_shader_param = r600_get_shader_param;
rscreen->b.b.resource_create = r600_resource_create;
- if (!r600_common_screen_init(&rscreen->b, ws, config->flags)) {
+ if (!r600_common_screen_init(&rscreen->b, ws)) {
FREE(rscreen);
return NULL;
}
}
bool r600_common_screen_init(struct r600_common_screen *rscreen,
- struct radeon_winsys *ws, unsigned flags)
+ struct radeon_winsys *ws)
{
char family_name[32] = {}, llvm_string[32] = {}, kernel_version[128] = {};
struct utsname uname_data;
rscreen->family = rscreen->info.family;
rscreen->chip_class = rscreen->info.chip_class;
- rscreen->debug_flags = debug_get_flags_option("R600_DEBUG", common_debug_options, 0);
+ rscreen->debug_flags |= debug_get_flags_option("R600_DEBUG", common_debug_options, 0);
rscreen->has_rbplus = false;
rscreen->rbplus_allowed = false;
- /* Set the flag in debug_flags, so that the shader cache takes it
- * into account. */
- if (flags & PIPE_SCREEN_ENABLE_CORRECT_TGSI_DERIVATIVES_AFTER_KILL)
- rscreen->debug_flags |= DBG_FS_CORRECT_DERIVS_AFTER_KILL;
-
r600_disk_cache_create(rscreen);
slab_create_parent(&rscreen->pool_transfers, sizeof(struct r600_transfer), 64);
enum blitter_attrib_type type,
const union pipe_color_union *attrib);
bool r600_common_screen_init(struct r600_common_screen *rscreen,
- struct radeon_winsys *ws, unsigned flags);
+ struct radeon_winsys *ws);
void r600_destroy_common_screen(struct r600_common_screen *rscreen);
void r600_preflush_suspend_features(struct r600_common_context *ctx);
void r600_postflush_resume_features(struct r600_common_context *ctx);
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.
*/