i965: official name for GM45 chipset
authorXiang, Haihao <haihao.xiang@intel.com>
Tue, 8 Jul 2008 06:14:04 +0000 (14:14 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Tue, 8 Jul 2008 06:14:04 +0000 (14:14 +0800)
src/mesa/drivers/dri/i965/brw_clip_line.c
src/mesa/drivers/dri/i965/brw_clip_state.c
src/mesa/drivers/dri/i965/brw_clip_tri.c
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_structs.h
src/mesa/drivers/dri/i965/brw_vs_emit.c
src/mesa/drivers/dri/intel/intel_chipset.h
src/mesa/drivers/dri/intel/intel_context.c

index 7d51cddfc3d700d34b0b50212bf93d95ecfa9614..0930e6a57393344ce07519b95d200bd4b851d4fc 100644 (file)
@@ -148,7 +148,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
    brw_clip_init_clipmask(c);
 
    /* -ve rhw workaround */
-   if (!BRW_IS_IGD(p->brw)) {
+   if (!(BRW_IS_GM45(p->brw) || BRW_IS_G4X(p->brw))) {
       brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
       brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
               brw_imm_ud(1<<20));
index 7cb21f894eb3829dd35ea3107ddd50b4f0340cff..2d0b24c5caeb2dee845945e8d8492ed7ef47d606 100644 (file)
@@ -102,7 +102,7 @@ clip_unit_create_from_key(struct brw_context *brw,
    clip.clip5.api_mode = BRW_CLIP_API_OGL;
    clip.clip5.clip_mode = key->clip_mode;
 
-   if (BRW_IS_IGD(brw))
+   if (BRW_IS_GM45(brw) || BRW_IS_G4X(brw))
       clip.clip5.negative_w_clip_test = 1;
 
    clip.clip6.clipper_viewport_state_ptr = 0;
index f1fc6e1e9da875d47faa377cb70616ff375435ca..7c703179fea2084298d9c1b5f08466272d4c2484 100644 (file)
@@ -536,7 +536,7 @@ void brw_emit_tri_clip( struct brw_clip_compile *c )
 
    /* if -ve rhw workaround bit is set, 
       do cliptest */
-   if (!BRW_IS_IGD(p->brw)) {
+   if (!(BRW_IS_GM45(p->brw) || BRW_IS_G4X(p->brw))) {
       brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
       brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2), 
               brw_imm_ud(1<<20));
index 3aada8cab1a36dad5137fb8c5b682a618d81365d..92c058ade8d5974edcbd202c5f71d3ab27e1d967 100644 (file)
 #define CMD_STATE_BASE_ADDRESS        0x6101
 #define CMD_STATE_INSN_POINTER        0x6102
 #define CMD_PIPELINE_SELECT_965       0x6104
-#define CMD_PIPELINE_SELECT_IGD       0x6904
+#define CMD_PIPELINE_SELECT_GM45      0x6904
 
 #define CMD_PIPELINED_STATE_POINTERS  0x7800
 #define CMD_BINDING_TABLE_PTRS        0x7801
 
 #define CMD_INDEX_BUFFER              0x780a
 #define CMD_VF_STATISTICS_965         0x780b
-#define CMD_VF_STATISTICS_IGD         0x680b
+#define CMD_VF_STATISTICS_GM45        0x680b
 
 #define CMD_DRAW_RECT                 0x7900
 #define CMD_BLEND_CONSTANT_COLOR      0x7901
 
 #include "intel_chipset.h"
 
-#define BRW_IS_IGD(brw)     (IS_IGD((brw)->intel.intelScreen->deviceID))
-#define CMD_PIPELINE_SELECT(brw)       ((BRW_IS_IGD(brw)) ? CMD_PIPELINE_SELECT_IGD : CMD_PIPELINE_SELECT_965)
-#define CMD_VF_STATISTICS(brw)         ((BRW_IS_IGD(brw)) ? CMD_VF_STATISTICS_IGD : CMD_VF_STATISTICS_965)
-#define URB_SIZES(brw)                 ((BRW_IS_IGD(brw)) ? 384 : 256)  /* 512 bit unit */
+#define BRW_IS_GM45(brw)        (IS_GM45_GM((brw)->intel.intelScreen->deviceID))
+#define BRW_IS_G4X(brw)         (IS_G4X((brw)->intel.intelScreen->deviceID))
+#define CMD_PIPELINE_SELECT(brw)        ((BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) ? CMD_PIPELINE_SELECT_GM45 : CMD_PIPELINE_SELECT_965)
+#define CMD_VF_STATISTICS(brw)          ((BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) ? CMD_VF_STATISTICS_GM45 : CMD_VF_STATISTICS_965)
+#define URB_SIZES(brw)                  ((BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) ? 384 : 256)  /* 512 bit unit */
 
 #endif
index fefd30bc7f51d8e4c2e8ca3bbd415b72e6217b5e..6b97f8b170c80c4b48158025267fdd5d8465acdb 100644 (file)
@@ -329,14 +329,14 @@ static void brw_set_sampler_message(struct brw_context *brw,
 {
    brw_set_src1(insn, brw_imm_d(0));
 
-   if (BRW_IS_IGD(brw)) {
-      insn->bits3.sampler_igd.binding_table_index = binding_table_index;
-      insn->bits3.sampler_igd.sampler = sampler;
-      insn->bits3.sampler_igd.msg_type = msg_type;
-      insn->bits3.sampler_igd.response_length = response_length;
-      insn->bits3.sampler_igd.msg_length = msg_length;
-      insn->bits3.sampler_igd.end_of_thread = eot;
-      insn->bits3.sampler_igd.msg_target = BRW_MESSAGE_TARGET_SAMPLER;
+   if (BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) {
+      insn->bits3.sampler_gm45_g4x.binding_table_index = binding_table_index;
+      insn->bits3.sampler_gm45_g4x.sampler = sampler;
+      insn->bits3.sampler_gm45_g4x.msg_type = msg_type;
+      insn->bits3.sampler_gm45_g4x.response_length = response_length;
+      insn->bits3.sampler_gm45_g4x.msg_length = msg_length;
+      insn->bits3.sampler_gm45_g4x.end_of_thread = eot;
+      insn->bits3.sampler_gm45_g4x.msg_target = BRW_MESSAGE_TARGET_SAMPLER;
    } else {
       insn->bits3.sampler.binding_table_index = binding_table_index;
       insn->bits3.sampler.sampler = sampler;
index 26ec797b5fdd5abda64f47b2b514a4c250dac20b..62df2590f35a54751d3e0e0c023138c156bc23f6 100644 (file)
@@ -192,7 +192,7 @@ static void emit_depthbuffer(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
    struct intel_region *region = brw->state.depth_region;
-   unsigned int len = BRW_IS_IGD(brw) ? sizeof(struct brw_depthbuffer_igd) / 4 : sizeof(struct brw_depthbuffer) / 4;
+   unsigned int len = (BRW_IS_GM45(brw) || BRW_IS_G4X(brw)) ? sizeof(struct brw_depthbuffer_gm45_g4x) / 4 : sizeof(struct brw_depthbuffer) / 4;
 
    if (region == NULL) {
       BEGIN_BATCH(len, IGNORE_CLIPRECTS);
@@ -203,7 +203,7 @@ static void emit_depthbuffer(struct brw_context *brw)
       OUT_BATCH(0);
       OUT_BATCH(0);
 
-      if (BRW_IS_IGD(brw))
+      if (BRW_IS_GM45(brw) || BRW_IS_G4X(brw))
          OUT_BATCH(0);
 
       ADVANCE_BATCH();
@@ -239,7 +239,7 @@ static void emit_depthbuffer(struct brw_context *brw)
                ((region->height - 1) << 19));
       OUT_BATCH(0);
 
-      if (BRW_IS_IGD(brw))
+      if (BRW_IS_GM45(brw) || BRW_IS_G4X(brw))
          OUT_BATCH(0);
 
       ADVANCE_BATCH();
@@ -324,7 +324,7 @@ static void upload_aa_line_parameters(struct brw_context *brw)
 {
    struct brw_aa_line_parameters balp;
    
-   if (!BRW_IS_IGD(brw))
+   if (!(BRW_IS_GM45(brw) || BRW_IS_G4X(brw)))
       return;
 
    /* use legacy aa line coverage computation */
index 1326280e00a8ac25071a6f53e8bd77312d7c12c5..ec865c925a79dbbf830641d20a630be87efca2cb 100644 (file)
@@ -175,7 +175,7 @@ struct brw_depthbuffer
    } dword4;
 };
 
-struct brw_depthbuffer_igd
+struct brw_depthbuffer_gm45_g4x
 {
    union header_union header;
    
@@ -1405,7 +1405,7 @@ struct brw_instruction
          GLuint msg_target:4;
          GLuint pad1:3;
          GLuint end_of_thread:1;
-      } sampler_igd
+      } sampler_gm45_g4x
 
       struct brw_urb_immediate urb;
 
index 3cac97c71f46be9752363ab632db69138525d9bf..7767d1369ceaeb9b0da9fb542183753a5bdd6185 100644 (file)
@@ -867,7 +867,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
        * Later, clipping will detect ucp[6] and ensure the primitive is
        * clipped against all fixed planes.
        */
-      if (!BRW_IS_IGD(p->brw) && !c->key.know_w_is_one) {
+      if (!(BRW_IS_GM45(p->brw) || BRW_IS_G4X(p->brw)) && !c->key.know_w_is_one) {
         brw_CMP(p,
                 vec8(brw_null_reg()),
                 BRW_CONDITIONAL_L,
index 4a5166263ac358d296743ce87f7b3947e96bf084..15b9ef431273ec5e8b0f7a7c01eab5094e6374be 100644 (file)
@@ -53,7 +53,7 @@
 #define PCI_CHIP_I965_GM                0x2A02
 #define PCI_CHIP_I965_GME               0x2A12
 
-#define PCI_CHIP_IGD_GM                 0x2A42
+#define PCI_CHIP_GM45_GM                0x2A42
 
 #define PCI_CHIP_IGD_E_G                0x2E02
 #define PCI_CHIP_Q45_G                  0x2E12
                                 devid == PCI_CHIP_I945_GME || \
                                 devid == PCI_CHIP_I965_GM || \
                                 devid == PCI_CHIP_I965_GME || \
-                                devid == PCI_CHIP_IGD_GM)
+                                devid == PCI_CHIP_GM45_GM)
 
-#define IS_IGD_GM(devid)        (devid == PCI_CHIP_IGD_GM)
+#define IS_GM45_GM(devid)       (devid == PCI_CHIP_GM45_GM)
 #define IS_G4X(devid)           (devid == PCI_CHIP_IGD_E_G || \
                                  devid == PCI_CHIP_Q45_G || \
                                  devid == PCI_CHIP_G45_G)
-#define IS_IGD(devid)           (IS_IGD_GM(devid) || IS_G4X(devid))
 
 #define IS_915(devid)          (devid == PCI_CHIP_I915_G || \
                                 devid == PCI_CHIP_E7221_G || \
@@ -90,7 +89,8 @@
                                 devid == PCI_CHIP_I965_GM || \
                                 devid == PCI_CHIP_I965_GME || \
                                 devid == PCI_CHIP_I946_GZ || \
-                                IS_IGD(devid))
+                                IS_GM45_GM(devid) || \
+                                IS_G4X(devid))
 
 #define IS_9XX(devid)          (IS_915(devid) || \
                                 IS_945(devid) || \
index 671b3f68a3e1fd7a242399196bfd36e3b7607c3b..f8ea6461c9c90655bdc77d026adef5f1dcd915bf 100644 (file)
@@ -166,7 +166,9 @@ intelGetString(GLcontext * ctx, GLenum name)
       case PCI_CHIP_I965_GME:
         chipset = "Intel(R) 965GME/GLE";
         break;
-      case PCI_CHIP_IGD_GM:
+      case PCI_CHIP_GM45_GM:
+        chipset = "Mobile IntelĀ® GM45 Express Chipset";
+        break; 
       case PCI_CHIP_IGD_E_G:
         chipset = "Intel(R) Integrated Graphics Device";
         break;