intel: Initial IS_GEN7 plumbing.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 16 May 2011 22:19:22 +0000 (15:19 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 May 2011 06:32:58 +0000 (23:32 -0700)
Currently, IS_GEN7, IS_IVYBRIDGE, IS_IVB_GT1, and IS_IVB_GT2 all return
false.  This allows me to write the code for them before actually adding
the PCI IDs and thus enabling the hardware.

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_screen.c

index a3f40effc352c59950f8755c65cafa5349bcb3a0..50b52bbb36d7107535704d66421b301a767577e8 100644 (file)
 
 #define IS_GEN6(devid)         (IS_GT1(devid) || IS_GT2(devid))
 
+#define IS_IVB_GT1(devid)       0
+
+#define IS_IVB_GT2(devid)       0
+
+#define IS_IVYBRIDGE(devid)     (IS_IVB_GT1(devid) || IS_IVB_GT2(devid))
+
+#define IS_GEN7(devid)         IS_IVYBRIDGE(devid)
+
 #define IS_965(devid)          (IS_GEN4(devid) || \
                                 IS_G4X(devid) || \
                                 IS_GEN5(devid) || \
-                                IS_GEN6(devid))
+                                IS_GEN6(devid) || \
+                                IS_GEN7(devid))
 
 #define IS_9XX(devid)          (IS_915(devid) || \
                                 IS_945(devid) || \
index acdf35fc71b911bdf9accbcb702da2b76a928b01..ba3014e1e13ac6cc2d95f3a71ff67978bf415279 100644 (file)
@@ -653,7 +653,10 @@ intelInitContext(struct intel_context *intel,
 
    intel->has_xrgb_textures = GL_TRUE;
    intel->gen = intelScreen->gen;
-   if (IS_GEN6(intel->intelScreen->deviceID)) {
+   if (IS_GEN7(intel->intelScreen->deviceID)) {
+      intel->needs_ff_sync = GL_TRUE;
+      intel->has_luminance_srgb = GL_TRUE;
+   } else if (IS_GEN6(intel->intelScreen->deviceID)) {
       intel->needs_ff_sync = GL_TRUE;
       intel->has_luminance_srgb = GL_TRUE;
    } else if (IS_GEN5(intel->intelScreen->deviceID)) {
index 5dacbb066338d30b6ce0207362bef54184f828b1..deca11d8c342052da47b72cabd445cca47f54edc 100644 (file)
@@ -556,7 +556,9 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
       intelScreen->deviceID = strtod(devid_override, NULL);
    }
 
-   if (IS_GEN6(intelScreen->deviceID)) {
+   if (IS_GEN7(intelScreen->deviceID)) {
+      intelScreen->gen = 7;
+   } else if (IS_GEN6(intelScreen->deviceID)) {
       intelScreen->gen = 6;
    } else if (IS_GEN5(intelScreen->deviceID)) {
       intelScreen->gen = 5;