i965: drop brw->is_cherryview in favor of devinfo->is_cherryview
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 30 Aug 2017 08:22:32 +0000 (09:22 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 30 Aug 2017 16:59:17 +0000 (17:59 +0100)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/genX_state_upload.c

index e9a4aff093fcbcee86024787384532db52d91012..d6d538f1364e3e263f3018e7b2bd8ac16c0fc111 100644 (file)
@@ -704,7 +704,7 @@ brw_initialize_cs_context_constants(struct brw_context *brw)
    struct gen_device_info *devinfo = &brw->screen->devinfo;
 
    /* FINISHME: Do this for all platforms that the kernel supports */
-   if (brw->is_cherryview &&
+   if (devinfo->is_cherryview &&
        screen->subslice_total > 0 && screen->eu_total > 0) {
       /* Logical CS threads = EUs per subslice * 7 threads per EU */
       uint32_t max_cs_threads = screen->eu_total / screen->subslice_total * 7;
@@ -858,7 +858,6 @@ brwCreateContext(gl_api api,
    brw->screen = screen;
    brw->bufmgr = screen->bufmgr;
 
-   brw->is_cherryview = devinfo->is_cherryview;
    brw->is_broxton = devinfo->is_broxton || devinfo->is_geminilake;
    brw->has_llc = devinfo->has_llc;
    brw->has_hiz = devinfo->has_hiz_and_separate_stencil;
index 5d44dac5414b374cd2daabe8387ad9291722fddd..3e49099b2780504d2a33275094fe38b136786e69 100644 (file)
@@ -746,7 +746,6 @@ struct brw_context
 
    uint64_t max_gtt_map_object_size;
 
-   bool is_cherryview;
    bool is_broxton;
 
    bool has_hiz;
index ab8caf9dbd9495a88df6c12a38f8ab00e76cf859..b15829fb57c89c9a889f3e1885ce354a6c908baa 100644 (file)
@@ -1591,7 +1591,9 @@ genX(upload_sf)(struct brw_context *brw)
 
       /* _NEW_LINE */
 #if GEN_GEN == 8
-      if (brw->is_cherryview)
+      const struct gen_device_info *devinfo = &brw->screen->devinfo;
+
+      if (devinfo->is_cherryview)
          sf.CHVLineWidth = brw_get_line_width(brw);
       else
          sf.LineWidth = brw_get_line_width(brw);