i965: Add initial IS_HASWELL() macros.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 13 Aug 2011 01:22:48 +0000 (18:22 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 30 Mar 2012 21:38:48 +0000 (14:38 -0700)
For now, these all return 0, as I don't yet want to enable Haswell
support.  Eventually they will be filled in with proper PCI IDs.

Also add an is_haswell field similar to is_g4x to make it easy to
distinguish Gen7 and Gen7.5.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/intel/intel_chipset.h
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_context.h

index 2e9fb2dcca6c3846c7e79a9827809fb2c12a6e25..eefb430f0b3b3970f11853cf5ba2f48668959c3d 100644 (file)
 
 #define IS_IVYBRIDGE(devid)     (IS_IVB_GT1(devid) || IS_IVB_GT2(devid))
 
-#define IS_GEN7(devid)         IS_IVYBRIDGE(devid)
+#define IS_GEN7(devid)         (IS_IVYBRIDGE(devid) || \
+                                IS_HASWELL(devid))
+
+#define IS_HSW_GT1(devid)      0
+#define IS_HSW_GT2(devid)      0
+
+#define IS_HASWELL(devid)       (IS_HSW_GT1(devid) || \
+                                IS_HSW_GT2(devid))
 
 #define IS_965(devid)          (IS_GEN4(devid) || \
                                 IS_G4X(devid) || \
index b87b33510064b3ee3cf1ba8748e5442eb7085269..fd5f0b604d635cd4815543cdf084f41025fb47ab 100644 (file)
@@ -608,15 +608,16 @@ intelInitContext(struct intel_context *intel,
    intel->gen = intelScreen->gen;
 
    const int devID = intelScreen->deviceID;
-
-   if (IS_SNB_GT1(devID) || IS_IVB_GT1(devID))
+   if (IS_SNB_GT1(devID) || IS_IVB_GT1(devID) || IS_HSW_GT1(devID))
       intel->gt = 1;
-   else if (IS_SNB_GT2(devID) || IS_IVB_GT2(devID))
+   else if (IS_SNB_GT2(devID) || IS_IVB_GT2(devID) || IS_HSW_GT2(devID))
       intel->gt = 2;
    else
       intel->gt = 0;
 
-   if (IS_G4X(devID)) {
+   if (IS_HASWELL(devID)) {
+      intel->is_haswell = true;
+   } else if (IS_G4X(devID)) {
       intel->is_g4x = true;
    } else if (IS_945(devID)) {
       intel->is_945 = true;
index bfe5f9445b8529ddd8d448c739dc151ef644ebc3..8ba727030fceb21e5c7c10601aef7cef287444c0 100644 (file)
@@ -208,6 +208,7 @@ struct intel_context
    int gen;
    int gt;
    bool needs_ff_sync;
+   bool is_haswell;
    bool is_g4x;
    bool is_945;
    bool has_separate_stencil;