i965: Add an isl_device to intel_screen
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 12 Jun 2017 23:02:00 +0000 (16:02 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 13 Jul 2017 04:15:46 +0000 (21:15 -0700)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/i965/intel_screen.h

index 5c57b864c29d7e1b8fcc5a3c480cd38ff3485f02..d8f187ff7e716793a35ee5b60b979e3ebffd2dd7 100644 (file)
@@ -853,7 +853,7 @@ brwCreateContext(gl_api api,
    brw->must_use_separate_stencil = devinfo->must_use_separate_stencil;
    brw->has_swizzling = screen->hw_has_swizzling;
 
-   isl_device_init(&brw->isl_dev, devinfo, screen->hw_has_swizzling);
+   brw->isl_dev = screen->isl_dev;
 
    brw->vs.base.stage = MESA_SHADER_VERTEX;
    brw->tcs.base.stage = MESA_SHADER_TESS_CTRL;
index c75f2125d4b3348b93c0cb567177a6b227500bf0..6c23834b2f44707e16c2a80f32a7e17d3078d043 100644 (file)
@@ -2121,6 +2121,9 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen)
    screen->hw_has_swizzling = intel_detect_swizzling(screen);
    screen->hw_has_timestamp = intel_detect_timestamp(screen);
 
+   isl_device_init(&screen->isl_dev, &screen->devinfo,
+                   screen->hw_has_swizzling);
+
    /* GENs prior to 8 do not support EU/Subslice info */
    if (devinfo->gen >= 8) {
       intel_detect_sseu(screen);
index f78b3e8f743d94fb77452adaac3790278e5bc172..0980c8f561bef55fabae9c55e88b1c197dfa1aef 100644 (file)
@@ -38,6 +38,8 @@
 #include "i915_drm.h"
 #include "xmlconfig.h"
 
+#include "isl/isl.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -60,6 +62,8 @@ struct intel_screen
 
    int hw_has_timestamp;
 
+   struct isl_device isl_dev;
+
    /**
     * Does the kernel support context reset notifications?
     */