gallium: get rid of pipe_screen_config::flags
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 3 Aug 2017 13:01:09 +0000 (15:01 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 4 Aug 2017 08:46:20 +0000 (10:46 +0200)
They were set only by the DRI state tracker, which is problematic
when radeonsi is used with different state trackers in the same
process.

Also, we don't need them anymore.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_screen.h
src/gallium/state_trackers/dri/dri2.c
src/gallium/state_trackers/dri/dri_screen.c
src/gallium/state_trackers/dri/dri_screen.h
src/gallium/state_trackers/dri/drisw.c

index 2b315e99c28c8143694ead2a174ba85335a8327f..321b677ade71105d653a7b78817d65a172c496d0 100644 (file)
@@ -390,12 +390,6 @@ enum pipe_flush_flags
  */
 #define PIPE_CONTEXT_PREFER_THREADED   (1 << 3)
 
-/**
- * Implicit and explicit derivatives after KILL behave as if KILL didn't
- * happen.
- */
-#define PIPE_SCREEN_ENABLE_CORRECT_TGSI_DERIVATIVES_AFTER_KILL (1 << 0)
-
 
 /**
  * Flags for pipe_context::memory_barrier.
index bf26a5298fbe9fdb1e0a552636dcfd7106cb091b..b6623d1dd71e71de264014e84b83f497f008f5bd 100644 (file)
@@ -365,7 +365,6 @@ struct pipe_screen {
  * Global configuration options for screen creation.
  */
 struct pipe_screen_config {
-   unsigned flags;
    const struct driOptionCache *options;
 };
 
index 1171e7386d76ea8711b3675488af5c50b551c407..0f36e1bf8943c6fb82e3fa8a12c918def18fcb16 100644 (file)
@@ -2073,8 +2073,7 @@ dri2_init_screen(__DRIscreen * sPriv)
    if (pipe_loader_drm_probe_fd(&screen->dev, fd)) {
       struct pipe_screen_config config = {};
 
-      config.flags =
-         dri_init_options_get_screen_flags(screen);
+      dri_init_options(screen);
 
       pscreen = pipe_loader_create_screen(screen->dev, &config);
    }
@@ -2169,7 +2168,7 @@ dri_kms_init_screen(__DRIscreen * sPriv)
 
    struct pipe_screen_config config = {};
 
-   config.flags = dri_init_options_get_screen_flags(screen);
+   dri_init_options(screen);
 
    if (pipe_loader_sw_probe_kms(&screen->dev, fd))
       pscreen = pipe_loader_create_screen(screen->dev, &config);
index b992d24068b73a3f403a6f0f1c26791daf21656e..406e97dc2429a10879a495a8fc6f472b4983d0df 100644 (file)
@@ -478,20 +478,12 @@ dri_set_background_context(struct st_context_iface *st,
       hud_add_queue_for_monitoring(ctx->hud, queue_info);
 }
 
-unsigned
-dri_init_options_get_screen_flags(struct dri_screen *screen)
+void
+dri_init_options(struct dri_screen *screen)
 {
-   unsigned flags = 0;
-
    pipe_loader_load_options(screen->dev);
 
    dri_fill_st_options(screen);
-
-   if (driQueryOptionb(&screen->dev->option_cache,
-                       "glsl_correct_derivatives_after_discard"))
-      flags |= PIPE_SCREEN_ENABLE_CORRECT_TGSI_DERIVATIVES_AFTER_KILL;
-
-   return flags;
 }
 
 const __DRIconfig **
index b8b27c30222a49401fc84aae464dff039b31fded..677e945e039241b525c637e331ae11fbe4e884f0 100644 (file)
@@ -130,8 +130,8 @@ void
 dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
                    const struct gl_config *mode);
 
-unsigned
-dri_init_options_get_screen_flags(struct dri_screen *screen);
+void
+dri_init_options(struct dri_screen *screen);
 
 const __DRIconfig **
 dri_init_screen_helper(struct dri_screen *screen,
index d3d44bf418b9b23ca24cc8d9b601bca13852fe81..ad40e2f837ba43e1fd45b044c5b8d9a0ba51eaa0 100644 (file)
@@ -402,7 +402,7 @@ drisw_init_screen(__DRIscreen * sPriv)
 
    if (pipe_loader_sw_probe_dri(&screen->dev, &drisw_lf)) {
       struct pipe_screen_config config;
-      config.flags = dri_init_options_get_screen_flags(screen);
+      dri_init_options(screen);
 
       pscreen = pipe_loader_create_screen(screen->dev, &config);
    }